  Statistical modeling of point patterns is an important and common problem in
several areas. The Poisson process is the most common process used for this
purpose, in particular, its generalization that considers the intensity
function to be stochastic. This is called a Cox process and different choices
to model the dynamics of the intensity gives rise to a wide range of models. We
present a new class of unidimensional Cox process models in which the intensity
function assumes parametric functional forms that switch among them according
to a continuous-time Markov chain. A novel methodology is proposed to perform
exact Bayesian inference based on MCMC algorithms. The term exact refers to the
fact that no discrete time approximation is used and Monte Carlo error is the
only source of inaccuracy. The reliability of the algorithms depends on a
variety of specifications which are carefully addressed, resulting in a
computationally efficient (in terms of computing time) algorithm and enabling
its use with large data sets. Simulated and real examples are presented to
illustrate the efficiency and applicability of the proposed methodology. A
specific model to fit epidemic curves is proposed and used to analyze data from
Dengue Fever in Brazil and COVID-19 in some countries.
