  StepMix is an open-source Python package for the pseudo-likelihood estimation
(one-, two- and three-step approaches) of generalized finite mixture models
(latent profile and latent class analysis) with external variables (covariates
and distal outcomes). In many applications in social sciences, the main
objective is not only to cluster individuals into latent classes, but also to
use these classes to develop more complex statistical models. These models
generally divide into a measurement model that relates the latent classes to
observed indicators, and a structural model that relates covariates and outcome
variables to the latent classes. The measurement and structural models can be
estimated jointly using the so-called one-step approach or sequentially using
stepwise methods, which present significant advantages for practitioners
regarding the interpretability of the estimated latent classes. In addition to
the one-step approach, StepMix implements the most important stepwise
estimation methods from the literature, including the bias-adjusted three-step
methods with Bolk-Croon-Hagenaars and maximum likelihood corrections and the
more recent two-step approach. These pseudo-likelihood estimators are presented
in this paper under a unified framework as specific expectation-maximization
subroutines. To facilitate and promote their adoption among the data science
community, StepMix follows the object-oriented design of the scikit-learn
library and provides an additional R wrapper.
