  Researchers are usually interested in examining the impact of covariates when
separating heterogeneous samples into latent classes that are more homogeneous.
The majority of theoretical and empirical studies with such aims have focused
on identifying covariates as predictors of class membership in the structural
equation modeling framework. In other words, the covariates only indirectly
affect the sample heterogeneity. However, the covariates' influence on
between-individual differences can also be direct. This article presents a
mixture model that investigates covariates to explain within-cluster and
between-cluster heterogeneity simultaneously, known as a mixture-of-experts
(MoE) model. This study aims to extend the MoE framework to investigate
heterogeneity in nonlinear trajectories: to identify latent classes, covariates
as predictors to clusters, and covariates that explain within-cluster
differences in change patterns over time. Our simulation studies demonstrate
that the proposed model generally estimates the parameters unbiasedly,
precisely and exhibits appropriate empirical coverage for a nominal 95%
confidence interval. This study also proposes implementing structural equation
model forests to shrink the covariate space of the proposed mixture model. We
illustrate how to select covariates and construct the proposed model with
longitudinal mathematics achievement data. Additionally, we demonstrate that
the proposed mixture model can be further extended in the structural equation
modeling framework by allowing the covariates that have direct effects to be
time-varying.

Methodology