mixmcm: a Stata command for estimating mixture of Markov chain models using ML and the EM algorithm
Résumé
Markov chain and mixture models have been widely applied in various strands of the academic literature. Several studies have combined both modeling approaches to account for unobserved heterogeneity within a population when analyzing dynamic processes. For instance, a restricted form of this combined approach, the so-called mover-stayer model (MSM), has been used to investigate agents mobility in sociology, economics, or medical sciences. This paper describes mixmcm, a user-written Stata command that allows estimating the general class of mixed Markov chain models (MMCM). To account for the possibility of incomplete information within the data, the model is estimated with maximum likelihood (ML) using the expectation-maximization (EM) algorithm. The proposed command enables users to estimate the MMCM parametrically, semiparametrically, or nonparametrically, depending on the chosen specifications for the transition probabilities and the mixing distribution. The MSM is obtained from this general setting by imposing relevant restrictions on the transition probability matrices. Dealing with the general model, mixmcm also enables one to endogenously identify the optimal number of homogeneous chains. A postestimation command is also provided for further inspection and analysis of results. The usefulness of the proposed command is illustrated with an application in the field of agricultural economics to analyze farm-size dynamics.