  Latent Markov (LM) models represent an important class of models for the
analysis of longitudinal data (Bartolucci et. al., 2013), especially when
response variables are categorical. These models have a great potential of
application for the analysis of social, medical, and behavioral data as well as
in other disciplines. We propose the R package LMest, which is tailored to deal
with these types of model. In particular, we consider a general framework for
extended LM models by including individual covariates and by formulating a
mixed approach to take into account additional dependence structures in the
data. Such extensions lead to a very flexible class of models, which allows us
to fit different types of longitudinal data. Model parameters are estimated
through the expectation-maximization algorithm, based on the forward-backward
recursions, which is implemented in the main functions of the package. The
package also allows us to perform local and global decoding and to obtain
standard errors for the parameter estimates. We illustrate its use and the most
important features on the basis of examples involving applications in health
and criminology.

Computation