LCA Latent Class Analisys Introduction
LCA Latent Class Analisys Introduction
Johannes Bauer
University of Erfurt
University of Erfurt
Nordhäuser Str. 63
99089 Erfurt
Germany,
E-mail: [email protected]
ORCID: 0000-0001-6801-2540
This is a preprint of the following chapter: Johannes Bauer, “A Primer to Latent Profile and
Latent Class Analysis”, published in “Methods for Researching Professional Learning and
Development: Challenges, Applications and Empirical Illustrations”, edited by Michael
Goller, Eva Kyndt, Susanna Paloniemi, and Crina Damşa, 2022, Springer, reproduced with
permission of Springer. The final authenticated version is available online at:
https://link.springer.com/book/10.1007/978-3-031-08518-5
2
Abstract
This chapter gives an applied introduction to latent profile and latent class analysis
groups. Their primary goals are probing whether and, if so, how many latent classes can be
identified in the data, and to estimate the proportional size and response profiles of these classes
in the population. Moreover, latent class membership can serve as predictor or outcome for
external variables. Substantively, LPA/LCA adopt a person-centered approach that is useful for
and decisions involved in their application, and illustrative examples using freely available data
Keywords: Latent variable models, mixture models, latent class analysis, latent profile
analysis.
3
1 Introduction
Suppose you are a lecturer in a study program who is teaching a compulsory lecture on a
difficult topic. The exam consists of a standardized test that is well-established in your
department and that provides scores ranging between 0 and 50. To get an impression of your
students’ achievement in the recent years you analyze the available data (N = 1000). You are
surprised to find that the data do not follow a normal distribution, as you would have expected,
but a bi-modal one, as illustrated in Figure 1a. Since you are wondering whether something is
wrong with the test you discuss this finding with a colleague. She mentions that the distribution
looks like the data came from two separate groups with different achievement levels. Indeed,
reportedly some students try passing the exam by rote rehearsal whereas others prepare more
thoroughly applying deeper learning strategies. Given the test tasks’ nature, it is reasonable that
rote rehearsal leads to diminished performance. Unfortunately, you do not have data on
students’ learning strategies. All you have is the achievement data. Nevertheless, you wonder
whether it would be possible to identify the unobserved groups given the data.
Let us put the latter question aside for a moment and suppose now we have insight of the
true population characteristics, as illustrated in Figure 1b. Indeed, there are two subpopulations,
the low-achieving students (supposedly superficial learners) marked red and the high achieving
ones (supposedly deep learners) marked blue. Because these subpopulations are unobserved in
our empirical data they are hidden from us and called latent classes. Within each latent class,
Fig. 1. Illustrative univariate finite normal mixture distribution: (a) empirically observed
distribution (N = 1000); (b) true population distributions: two within-class distributions [red:
𝒩 𝜇 15; 𝜎 3 ; blue: 𝒩 𝜇 30; 𝜎 5 ] and their joint mixture distribution (black line).
So, how can we recover the latent classes shown in Figure 1b based on the observed
achievement data? This is where mixture models come in. Mixture models are a family of
statistical procedures for uncovering hidden groups. As Oberski (2016) put it, “Mixture
modeling is the art of unscrambling eggs” (p. 275). In this chapter, I will introduce latent profile
analysis (LPA) and latent class analysis (LCA) which are mixture models for cross-sectional
data. The main difference between them is that LPA applies to continuous response variables,
whereas LCA applies to categorical ones. As we will see, a LPA for the example data in Figure
1a gives us information on (i) the number of latent classes, (ii) model fit and the accuracy of
the classification, (iii) the proportional size of each class, (iv) the within-class means and
variances, and (v) probability values for each person’s latent class membership. Of course, since
we have not observed class membership, the classification is inevitably uncertain. A major
advantage of LPA/LCA over traditional cluster analysis is that this classification uncertainty is
an explicit part of the statistical model (Rost, 2003; Vermunt & Magidson, 2002).
5
The following section will give readers a conceptual background of LPA/LCA. Next, I
provide didactic examples how to implement LPA and LCA. The chapter will close with some
2 Conceptual overview
As mentioned, LPA/LCA belong to the broad family of mixture models (Hancock &
Samuelsen, 2008; Mclachlan & Peel, 2000; Masyn, 2013; Sterba, 2013). The common purpose
based on a statistical model, where each class is one of the K categories of a discrete latent
variable c. Hence, unlike in traditional factor analysis or IRT modeling, the latent variable is
categorical instead of continuous. All mixture models combine a within-class and a between-
class model (Sterba, 2013). The within-class model defines the population parameters for
persons in a given class k who constitute a relatively homogeneous sub-group regarding these
parameters. The between-class model defines each persons’ probability of being sampled from
the sub-population underlying class k. Thus, mixture models cluster persons who are similar in
terms of the within-class parameters and yield per person a classification probability for each
class. Persons then can be assigned to a latent class based on their highest membership
conceptual advantage of mixture models over the deterministic (hard) assignment applied in
traditional cluster analysis because it explicitly accounts for the mentioned classification
Differences among various kinds of mixture models concern the parameters that are in focus
of the classification (i.e., conditional means/item probabilities vs. regression parameters) and
whether the data are cross-sectional vs. longitudinal (Tab. 1). Moreover, the observed items’
level of scale can be considered, e.g., to distinguish LPA and LCA. The latter distinction is
somewhat artificial, however, since both LPA and LCA are just special cases of the general
6
mixture model. It is even possible to combine indicators of mixed levels of scale in the same
analysis (Vermunt & Magidson, 2002; see Mair, 2018, for an illustrative application).
Classification by
different response profiles on the analyzed items (Rost, 2003; Vermunt & Magidson, 2002). If
the items are continuous, the profiles are patterns of class-specific means; if they are categorical,
the profiles are defined by the items’ class specific endorsement probabilities (i.e., for
dichotomous items the probability of scoring 1 vs. 0). This basic idea extends to the longitudinal
across multiple measurement occasions; latent transition analysis models latent classes for each
time point (latent statuses) as well as transitions between them (Collins & Lanza, 2010).
Though not elaborated in this chapter, mixture models for regression coefficients are
mode of data analysis and in a confirmatory, hypothesis-testing one (Finch & Bronk, 2011).
The former occurs more frequently in practice and applies when a researcher has only tentative
7
or no prior assumptions about the latent classes. It should be emphasized, however, that even
elaborated below, this number is not an estimable model parameter. Testable hypotheses
concern only the class sizes and their response patterns on the items.
LPA. In LPA, we typically assume a normal distribution within each latent class, though
other distributions are possible, such as Poisson for count data (Mair, 2018; Vermunt &
Magidson, 2002). Note that the normality assumption applies only to these subpopulation
distributions, not to their joint distribution, and it is untestable. Each latent class (1, …, K) has
and 𝜇 and 𝜎 are its mean and variance in class k. The joint mixture model is given by
𝑓 𝑥 𝜋 𝑓 𝑥 |𝜇 , 𝜎 (1)
where 𝜋 is the relative class size, or equivalently, the class probability (also called mixture
weight). That is, each person’s density in the mixture distribution is a sum of the class specific
normal densities weighted by the class probabilities. For example, consider persons with a test-
score of 21 in Figure 1b. Their mixture density (i.e., value on the black curve) is the sum of the
two class-specific densities (i.e., values on the red and blue curves, respectively) which are
weighted by the respective class probabilities. In the multivariate case, where 𝒙𝒊 is a vector of
responses on a set of M observed items, the model remains essentially the same but each class
Of course, before the analysis, we neither know the class probabilities nor the class-specific
means and (co)variances. Unless further restrictions are imposed, these are the model
parameters that have to be estimated. Because the number of free parameters grows quickly
with the number of latent classes and indicators, it makes sense to specify further restrictions to
increase model parsimony and estimation stability (Vermunt & Magidson, 2002). Frequently,
8
one imposes a local independence restriction meaning that the indicators are constrained to be
uncorrelated within each latent class.1 Additionally, a cross-class equality restriction on the
across classes (Vermunt & Magidson, 2002). Together these two restrictions ensure that the
classes differ only in their mean profiles, and not in the form of the variance-covariance matrix,
which facilitates interpretation (Peugh & Fan, 2013). Several other models with different sets
of restrictions are available (Masyn, 2013; Pastor et al., 2007; Scrucca et al., 2016). Finally, an
important point visible in equation 1 is that the number of classes is not an estimated model
parameter. Rather, the number of classes has to be decided upon by the analyst on grounds of
statistical and substantive criteria (see section 2.3). Once a target model has been selected, its
LCA. The LCA model works similarly though it applies to categorical items. LCA starts
with the basic idea of local independence, that is, it seeks to establish latent classes such as that
responses on a set of categorical items are independent within classes (Rost, 2003). Suppose
we have a vector of responses 𝒖𝒊 to a set of M categorical items. Under the local independence
assumption, the LCA model provides the probability for a given response pattern on these items
by
𝑃 𝒖𝒊 𝜋 𝑃 𝑢 |𝑐 𝑘 . (2)
That is, the probability of a specific combination of item responses depends on the class
probabilities and the product of the item response probabilities given class membership. These
are the model parameters to be estimated. For items with J categories the item probabilities are
the J-1 thresholds between these categories. Again, further restrictions may be imposed on the
1
That is, residual correlations among the indicators are zero given class membership. Local independence is
a default assumption in many latent variable models, such as factor analysis or IRT models, but can be relaxed.
9
model. Note that the local independence assumption can be evaluated and also be partially
analysis. Four steps can be distinguished, the last of which is optional: (i) specifying the model,
(ii) determining the number of latent classes, (iii) interpreting the target solution substantively,
and (iv) including predictors and/or outcomes of latent class membership. In the following, I
Step 1: Model specification. In specifying the model researchers need to make a theory-
based selection of observed indicators, decide how these indicators enter the model, and what,
if any, restrictions to impose on the model parameters. Concerning the selection of indicators,
one should keep in mind that LPA/LCA are measurement models (Wang & Wang, 2020). So,
there should be a rationale that the indicators measure a joint theory-based construct (e.g.
persons over a range of conceptually related, but distinct constructs (e.g., J. Bauer & Mulder,
2013; Gillet et al., 2020). In that case, the resulting profiles are mere summaries of persons with
similar answer patterns and should not be interpreted as realizations of a latent trait (see section
4.1 on the danger of reification). In either case, it makes only sense to apply LPA/LCA if the
set of indicators is inter-correlated. So, screening item associations prior to the analysis is
warranted.
aggregated form, and whether to apply prior transformations. Aggregation is frequently done
by computing composite mean scores, factor scores, or (preferably) plausible values of the
(sub-)scales to be analyzed (e.g., Bauer & Prenzel, 2021; Hong et al., 2020; Kunst et al., 2016;
10
Mair, 2018).2 This approach considerably reduces the number of parameters to be estimated
and better approximates continuous indicators. An arguably optimal approach in this regard is
second-order LPA in which the latent class variable is a second-order variable with continuous
first-order factors serving as indicators (for an application see Bauer et al., 2018). With this
specification, the indicators used for the latent classification are latent factors that are truly
continuous and corrected for measurement error. Note that this approach requires scaling the
Concerning parameter restrictions, researchers may wish to start with the local
independence model since this is the traditional basis of LCA, and potentially consider cross-
class equality constraints on the indicator variances. Any other restrictions should be made on
substantive grounds (see Rost, 2006, for interesting applications). Attention should be payed to
the default restrictions implemented by specific software packages. For example, Mplus
(Muthén & Muthén, 1998-2017) by default imposes local independence and homogeneity
across classes. An alternative strategy implemented routinely in the mclust package (Scrucca
et al., 2016) is estimating a variety of models with different restrictions and choosing the best
fitting one (including a decision on the number of latent classes; see Step 2). This data driven
interpreting what the restrictions applied by the selected model mean substantively may not
Step 2: Class enumeration. Deciding on the number of classes may be the most difficult
step in the whole analysis. The goal is to yield a solution that balances model parsimony and
fit, and that delivers substantively interpretable classes. For this purpose, one estimates3 a series
2
Using composite scores of categorical items as indicators will turn a LCA into a LPA.
3
Discussing details of estimation is beyond the scope of this chapter; for a tractable introduction, see Masyn
(2013).
11
of models from 1 to K latent classes and compares them on indices of relative model fit and
The most commonly used fit indices are the Bayesian Information Criterion (BIC), its
sample-size-adjusted variant (SABIC), and the Akaike Information Criterion (AIC). With these
and any other information criteria, lower values indicate better model fit. Ideally, a minimum
value in the series of candidate models points at the best-fitting solution. In practice, fit indices
may continue to improve as more latent classes are extracted. In such circumstances, an elbow-
plot – similar to the scree-plot in exploratory factor analysis – can be useful to identify at which
step the improvement in model fit plateaus. Next to information criteria, models with adjacent
numbers of latent classes can be compared by a likelihood ratio test (LRT) which is available
in several versions. Some simulation studies indicate the bootstrapped LRT (BLRT) to be quite
effective in class enumeration (Nylund et al., 2007). A statistically significant result of the LRT
supports the k-class model over k-1 classes. In theory, one choses the model after which the
LRT is statistically non-significant for the first time. Again, in practice the LRT may continue
to stay significant for the whole series of probed models, especially with large sample sizes.
Classification diagnostics can additionally inform the class enumeration process. For each
latent class, average posterior class probabilities (AvePPk) provide a measure of classification
accuracy. As the name suggests, they are based on averaging for class k the model-estimated
(i.e. posterior) latent class membership probabilities for individuals with their highest
membership probability in this class. Values ≥ .70 have been proposed as desirable (Masyn,
2013). The information about classification accuracy is condensed in the entropy measure that
ranges between 0 and 1 and can be interpreted similar to a reliability coefficient for the
classification (values ≥ .80 are desirable, ≥ .60 a suggested minimum; Asparouhov & Muthén,
2014). Classification accuracy may be helpful to decide between solutions that have similar fit
(Rost, 2006), but note that entropy is not a good sole or primary model selection criterion
(Masyn, 2013).
12
As a final word of caution, though there is extensive research on fit indices in mixture
models (e.g., Nylund et al., 2007; Peugh & Fan, 2013; Tofighi & Enders, 2008), results have
not yet converged and there is no single best index. Applied researchers frequently combine an
array of indices for class enumeration but – probably more often than not – their results may
that model selection needs to be guided at least as much by the substantive interpretability of
the class solution as by fit indices. If multiple solutions with similar fit occur, one should inspect
LPA/LCA is similar to traditional cluster analysis or exploratory factor analysis. For this
purpose, one inspects the class-specific mean/probability profiles across the indicators and
differences in these profiles across classes. Depending on model specification, class specific
(co)variances are of importance, too. Based on this interpretation, a definition and label need to
be attached to each class. Finally, the class sizes are of interest to distinguish common or
normative profiles from more exceptional ones. In general, no solution should be retained that
is not well interpretable, regardless of model fit. Some authors consider a solution useless in
which not all classes are interpretable (Wang & Wang, 2020). However, Mair (2018) notes that
the occurrence of a single uninterpretable junk-class is not problematic since it may simply
contain the persons that did not fit in any of the other classes.
apply (Collins & Lanza, 2010; Masyn, 2013; Rost, 2006): First, the class profiles should be
distinct enough. That is, there should be low variability within classes and a high one between
them (Collins & Lanza, 2010). In this context, it may be helpful to compare solutions with
adjacent numbers of classes to see from what classes in a prior solution members of a new class
are drawn (Rost, 2006). Sometimes a class in the prior solution is simply split up in two classes
and the researcher needs to consider the value added by this differentiation. Moreover, finding
13
the structure of profiles to vary greatly across different solutions may be indicative that
Second, it should be checked, whether the indicators can be arranged in a way so that the
class profiles are ordered (i.e., they do not cross each other in a profile plot). Such a solution –
particularly, if the profiles are more or less parallel – would indicate that the classes differ by
degree, rather than by type (Rost, 2006; Wang & Wang, 2020). In such a case, the classification
is still meaningful, but a model focusing on quantitative differences in the latent variable (i.e.,
a factor or IRT model) would provide a more parsimonious account of the data.
Finally, solutions with several small classes (say ≤ 5%) may be indicative that too many
classes have been extracted (Nylund et al., 2007). Though such small classes can be of
substantive interest, it should be checked critically whether they have a distinct and
interpretable profile.
Step 4: Include predictors and distal outcomes of most likely latent class membership.
Having established a latent class solution, a logical next step is to analyze predictors or
dependent variables of latent class membership (Vermunt & Magidson, 2002). This is called
LPA/LCA with covariates and distal outcomes. Such analyses are useful (i) to enrich the
description of the latent classes based on background information (e.g., social background
variables or experimental condition), (ii) to analyze the construct-validity of the latent class
solutions, or (iii) to test hypotheses for answering substantive research questions. The latter two
cases lead to a blend of exploratory and confirmatory analyses (Masyn, 2013) because the
hypotheses can only be stated after the classification. However, even if the classification is
intrinsically exploratory, the later hypotheses about the classes’ relation to covariates and distal
Methods for analyzing covariates and distal outcomes in mixture models are still an active
area of research. Though it may be tempting to simply extract individuals’ modal class
assignment from the results and use this as a manifest variable for further analyses (e.g. as factor
14
in an ANOVA), it is well known that this procedure leads to biased results and is inappropriate
(Bakk & Kuha, 2020). The reason is that this hard classification disregards the classification
recommend using the two-step method or one of the bias-corrected three-step methods (BCH
and ML) for handling covariates; (manual) BCH is advisable for continuous and categorical
distal outcomes (Asparouhov & Muthén, 2021; Bakk & Kuha, 2020; Nylund-Gibson et al.,
2019). Unfortunately, these approaches are currently only available in commercial software
(Latent Gold, Mplus). Illustrating the application of LPA/LCA with covariates and distal
outcomes is beyond the scope of this chapter, but readers will find didactic examples in the
So far, this chapter has introduced LPA/LCA from a statistical perspective. What, however,
is the substantive added value of mixture models – and LPA/LCA in particular – for studying
professional learning and development? Mixture models have unique advantages in studying
individual differences in learning, its conditions, and outcomes (Bauer et al., 2018; Collins &
Lanza, 2010; Hancock & Samuelsen, 2008; Masyn, 2013). Conceptually, mixture analyses
adopt a person-centered approach that is helpful when a researcher aims to analyze categorical
researchers might be interested in the degree to which some predictors are relevant for
perspective they may ask what typical patterns of engagement in learning activities occur, how
prevalent these patterns are, and what background variables characterize people demonstrating
a specific pattern. Hence the two perspectives are complementary and should not be
15
dichotomized falsely (Masyn, 2013). Synergies can arise from taking both perspectives on the
same research topic (Marsh et al., 2009). For example, Bauer and Mulder (2013) studied
predictors of and individual differences in nurses’ engagement in learning activities after errors
at work. In a variable-centered analysis, they found that nurses’ perceptions of errors and their
social context predicted this engagement. A subsequent LPA complemented these findings by
identifying four typical patterns of reactions to errors and learning engagement, with a
More generally speaking, LPA/LCA can be used whenever there are theoretical reasons to
believe that a latent construct is categorical. As Collins and Lanza (2010) argue, many variables
of substantive interest can be understood both in terms of continua and categories. They employ
the example of alcohol consumption which may be defined continuously as the volume of
alcohol consumed in a given period of time. At the same time, it makes substantive sense to
social drinking, binge drinking, or being alcohol addict. Referring to our introductory example,
learners showing mastery vs. non-mastery. So, readers will find that LPA/LCA (and other
mixture models) are applicable to a broad spectrum of variables relevant to professional and
work-related learning.
This section will provide three didactic examples of LPA and LCA. We will use simulated
data and the packages mclust (Scrucca et al., 2016), tidyLPA (Rosenberg et al., 2018), and
poLCA (Linzer & Lewis, 2011) in the R statistical environment (R Core Team, 2021) so that
readers can reproduce all analyses. Though the data are simulated, Examples 2 and 3 are based
on published studies that used LPA (Gillet et al., 2020) and LCA (Richter et al., 2013). Below,
I restrict the presentation to the most important parts of the in- and output. Complete code and
data files are available in the supplemental online material (SOM) at https://osf.io/x3ahn.
16
Turning back to the initial example from Figure 1, we will use LPA to recover the two
hidden groups in the mixture distribution of student achievement. Since there is only one
variable, our only choice in model specification is whether we allow the class-specific variances
to vary, or not. Since our empirical data suggest different spread in the presumed clusters (Fig.
1a) it seems reasonable to freely estimate the variances within each class.
For class enumeration, we estimate models with k = 1 to 4 latent classes using the code
pasted below. The argument modelName = "V" specifies varying variances across classes.
If we omit this argument, mclust will estimate models with and without equality constraints
and users can compare their fit to the data. The next commands call for an elbow plot of BIC
library(mclust)
m1 <‐ Mclust(data = mix, modelName = "V", G = 1:4)
plot(m1, what = "BIC")
LRT <‐ mclustBootstrapLRT(mix, modelName = "V", maxG = 3)
Unfortunately, mclust delivers only a few fit indices. If we desire a broader variety of
indices, we can compute them manually based on the information stored in the output object
functions for mclust. Both options are demonstrated in the SOM. Table 2 presents a selection
of fit indices, all of which indicate that the two-class model fits the data best. This is backed up
by the BLRT showing that the two-class model fits the data significantly better than the one-
class model, whereas moving to three classes does not provide a further statistically significant
improvement in fit.
17
Table 2. Selected fit indices for the univariate LPA of student achievement.
Note. LL = Log Likelihood; note that in mclust higher values on information criteria indicate
Concerning classification diagnostics, we can use the uncertainty values and modal class
assignments stored in the mclust output object to calculate average posterior class probabilities
which are AvePP1 = .95 for Class 1 and AvePP2 = .98 for Class 2 (see SOM). Entropy values
can be obtained by get_fit()and show that the 2-class model has high classification
accuracy (E = .89). Thus having identified a best fitting model, we can inspect its estimated
## ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
## Gaussian finite mixture model fitted by EM algorithm
## ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
##
## Mclust V (univariate, unequal variance) model with 2 components:
##
## log‐likelihood n df BIC ICL
## ‐3399.819 1000 5 ‐6834.176 ‐6903.184
##
## Clustering table:
## 1 2
## 309 691
##
## Mixing probabilities:
## 1 2
## 0.3090278 0.6909722
##
## Means:
## 1 2
## 15.23148 30.14721
##
18
## Variances:
## 1 2
## 9.633501 23.584189
The first part of the output reiterates information about model fit. The clustering table tells
us that n = 309 persons had their modal class membership in Class 1, and n = 691 in Class 2.
The estimated class sizes in the population (mixing probabilities) are 30.9 % for Class 1 and
69.1 % for Class 2. The most important part of the output are the sections on class-specific
means and variances. Class 1 has an average achievement of M = 15.2 (SD = 3.1), and Class 2
M = 30.1 (SD = 4.9). Given these values, the two classes can be interpreted as consisting of
Apparently, our LPA recovered the class-specific population parameters very well (cf. Fig
1b). Of course, LPA cannot deliver evidence that there are two latent classes because some
students applied different learning strategies than others. To investigate this, we might conduct
a new study collecting additional data on students’ learning strategies and checking whether
strategies predict latent class membership. We could also collect additional data on some
external criterion (say later study success) and use the latent class variable as a predictor.
Finally, with our simulated data, it is possible to compare class assignment based on the
LPA results with individuals’ true class membership. As table 3 shows, there is a correct
classification rate of 97.5%. So, the LPA was quite effective in recovering the unobserved
groups.
Table 3. True class versus most likely class membership from LPA.
LPA
True 1 2 Total
A 292 8 300
B 17 683 700
This example of a univariate LPA demonstrated general procedures that transfer to the
multivariate case. Though univariate LPA may rarely be of substantive interest in applied
research, it can be a useful methodological tool. For example, in a recent online study, we used
it to identify a cluster of participants with unreasonably short time on task that we discarded as
junk participations. LPA provides arguably a more principled approach for this purpose than
setting an arbitrary cut off time. Moreover, univariate LPA may be an alternative to common
grouping procedures, such as the median split (Rost, 2006). For this purpose, equality
restrictions may be imposed on the class sizes to yield equally sized groups.
In most applied cases researchers will wish to use LPA on multiple indicators. The
illustrative example presented in this section is based upon Study 1 in Gillet et al. (2020) who
employees from various occupations. Factor scores on three psychological mechanisms of work
recovery served as indicators: (i) psychological detachment as the ability to mentally step back
preoccupied with distressful aspects after work; and (iii) overcommitment as a generic tendency
detachment is a functional mechanism for the work recovery process, rumination and
overcommitment are dysfunctional ones. Population values for the data simulation (N = 500)
were chosen in line with results from Gillet et al. (2020). Hence, within sampling error, our
The code below instructs mclust to specify and fit a series of models with k = 1 to 8 latent
estimates a set of 14 models that impose specific model constraints based on different geometric
features of 𝚺𝒌 (Scrucca et al., 2016). The substantive implications of these features may be hard
20
to interpret for applied researchers. Important models, also discussed in other literature on LPA
(Masyn, 2013; Pastor et al., 2007; Rosenberg et al., 2018), are in order of decreasing parsimony:
Of these, EEI and VVI are local independence models, EEE and VVV relax this assumption.
## ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
## Gaussian finite mixture model fitted by EM algorithm
## ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
##
## Mclust VVI (diagonal, varying volume and shape) model with 4 components:
##
## log‐likelihood n df BIC ICL
## ‐1450.855 500 27 ‐3069.505 ‐3104.645
##
## Clustering table:
## 1 2 3 4
## 58 159 225 58
The summary output suggests that the VVI model with four latent classes fits the data best.
To inspect fit more closely, we can call for an elbow-plot comparing all mclust models (see
SOM). Of course, as an alternative to this data-driven strategy, we could have specified a priori
specified local independence and equal cross-class variances by setting the argument
modelName = "EEI". To test the tenability of these restrictions, next, we could compare
the fit of the EEI model to a less restrictive one such as VVI.
enumeration decision on a broader set of indices. Again, this is achieved conveniently using
recommendation based on a number of fit indices (see SOM). Moreover, it may be helpful to
plot selected indices. As visible from Figure 2, the four-class solution fits best according to
BIC, CAIC. AIC and SABIC seem less conclusive but parsimony would speak for the four-
class solution, too, unless a model with more classes would have advantages in terms of
substantive interpretability. The BLRT pasted in the output below adds further support to the
set.seed(123456)
LRT <‐ mclustBootstrapLRT(wr, modelName = "VVI", maxG = 5)
LRT
## ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
## Bootstrap sequential LRT for the number of mixture components
## ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
## Model = VVI
## Replications = 999
## LRTS bootstrap p‐value
## 1 vs 2 551.686999 0.001
## 2 vs 3 289.270784 0.001
## 3 vs 4 245.745002 0.001
## 4 vs 5 18.770582 0.051
## 5 vs 6 3.532327 0.937
22
Next, we inspect classification diagnostics. The listing below delivers AvePP values all of
which are satisfactory. Entropy is high, too (E = .93; see SOM). mclust offers additional
diagnostic plots based on dimensionality reduction that allow inspecting the boundaries
between the classes to see whether they are well separated (SOM).
round(aggregate(x = 1 ‐ m1$uncertainty,
by = list(m1$classification),
FUN = "mean"), 2)
## Group.1 x
## 1 1 0.96
## 2 2 0.96
## 3 3 0.97
## 4 4 0.98
Having decided on the number of classes, we can refit the target model and inspect the
(...)
## Clustering table:
## 1 2 3 4
## 58 159 225 58
##
## Mixing probabilities:
## 1 2 3 4
## 0.1138546 0.3152577 0.4546402 0.1162474
##
## Means:
## [,1] [,2] [,3] [,4]
## overcom ‐1.540950 0.5203160 ‐0.4246870 1.636629
## pdetach 1.417878 ‐0.4843335 0.3818300 ‐1.548249
## rumin ‐1.264305 0.4850927 ‐0.3714648 1.185387
##
## Variances:
## [,,1]
## overcom pdetach rumin
## overcom 0.1200567 0.00000000 0.0000000
## pdetach 0.0000000 0.05935828 0.0000000
## rumin 0.0000000 0.00000000 0.4626966
## [,,2]
## overcom pdetach rumin
## overcom 0.1068036 0.0000000 0.0000000
23
(...)
The mixing probabilities indicate that class sizes vary between 11 and 45 % of the sample.
The class-specific mean profiles can be found under “Means”. Plotting them facilitates their
interpretation (Fig. 3). As concluded in Gillet et al. (2020), the classes can be interpreted to
demonstrate high (Class 1, 11 %), moderately high (Class 3, 45 %), moderately low (Class 2,
32 %), and low (Class 4, 11 %) ability to achieve work recovery. Note that this implies that the
identified latent classes differ mostly in terms of degree rather than by type. Indeed, the profiles
would be perfectly ordered had we recoded psychological detachment so that higher values on
all three indicators meant worse ability to achieve work recovery. As discussed above, such an
ordered classification is meaningful by pointing at clusters of persons who show similar levels
of the investigated trait(s). Nevertheless, these quantitative differences could be modeled more
parsimoniously using a continuous latent variable model (Rost, 2006; Wang & Wang, 2020).
So, some might question whether LPA is the best modeling choice in the present case.
Fig. 3. Mean profiles of four latent classes of work recovery (simulated data based on Gillet et
al., 2020).
24
The last part of the output shows the class specific variance-covariance matrices. As implied
by the VVI model, the class-specific covariances are fixed at zero (i.e. local independence) and
the indicator variances are allowed to vary. For example, the variance of rumination is higher
in Class 1 than in Class 2. Such information may be important for understanding the nature of
Finally, a comparison with individuals’ true population class membership shows that about
This section gives an applied example of LCA for categorical variables using the poLCA
package. It draws upon a study by Richter et al. (2013) who investigated individual differences
their LCA, the authors analyzed eight dichotomized items indicating whether teachers during
the last five years had participated (yes/no) in PD activities on each of the following topics: (i)
content knowledge, and (ii) pedagogical content knowledge, each with a focus on reading
comprehension, (iii) teaching and learning methods, (iv) teaching heterogeneous students, (v)
classroom management and discipline, (vi) individualized learning support, (vii) counseling
students and parents, and (viii) knowledge about kids and youth. As in Example 2, we will use
simulated data (N = 2076) with population parameters based on the outcomes of the original
study.
For model specification, poLCA requires users to explicitly provide a model formula. The
first part of the code below specifies a LCA-model with no covariates and stores it in an R
object. Next, we use it to estimate a series of models with k = 1 to 7 latent classes. Unlike in
mclust, each model needs to be estimated in a separate function call. The argument nrep
specifies the number of times to estimate each model using different sets of random starting
values for the estimation algorithm. This is important to avoid solutions that converge at local
instead of global maxima of the likelihood function. Local maxima are a plague in mixture
25
modeling (e.g. Masyn, 2013). We did not need to take care of this problem in the previous LPA
examples because mclust employs a different approach to avoid local maxima (Scrucca &
Raferty, 2015). In the present LCA, we estimate each model with at least ten sets of random
starting values. Larger numbers are typically required for complex models, especially in serious
applications. Here, we increase the number of random starts for the models with 6 and 7 latent
classes and additionally increase the maximum number of iterations (default = 1000) to attain
library(poLCA)
f <‐ cbind(CK, PCK, TLM, THS, CMD, ILS, CSP, KKY) ~ 1
set.seed(934857)
m1 <‐ poLCA(f, pd[ ,‐9], nclass = 1, nrep = 10)
m2 <‐ poLCA(f, pd[ ,‐9], nclass = 2, nrep = 10)
m3 <‐ poLCA(f, pd[ ,‐9], nclass = 3, nrep = 10)
m4 <‐ poLCA(f, pd[ ,‐9], nclass = 4, nrep = 10)
m5 <‐ poLCA(f, pd[ ,‐9], nclass = 5, nrep = 10)
m6 <‐ poLCA(f, pd[ ,‐9], nclass = 6, nrep = 50, maxiter = 5000)
m7 <‐ poLCA(f, pd[ ,‐9], nclass = 7, nrep = 50, maxiter = 5000)
To assess model fit, poLCA delivers the information criteria AIC and BIC. As in the
previous examples, further fit indices can be calculated manually based on the model results
(SOM). The elbow plot in Figure 4 shows that BIC, CAIC, and SABIC point at a best fitting
solution with five latent classes whereas AIC continues to improve as more classes are
extracted. Unfortunately, the BLRT is not available in poLCA. So, based on the present
information, we may preliminarily decide for the 5-class model and inspect classification
diagnostics.
26
The listing below, first calculates AvePP all of which are > .70. Regarding entropy, note
that poLCA does not estimate relative entropy as is typically used in other software. The
function provided below provides this index (cf. Collins & Lanza, 2010, p. 75). As we can
obtain from the output, entropy for the 5-class model is somewhat below the recommended
value of .80 but acceptable (i.e., > .60). From the series of values, we can see that initially
entropy decreases slightly as more classes are extracted. As Collins and Lanza (2010) note, this
is frequently the case and an artefact of chance. Recall from the discussion above that entropy
## Group.1 V1 V2 V3 V4 V5
## 1 1 0.75 0.06 0.09 0.09 0.01
## 2 2 0.01 0.88 0.02 0.03 0.06
## 3 3 0.03 0.03 0.89 0.04 0.00
## 4 4 0.06 0.06 0.05 0.78 0.05
## 5 5 0.00 0.13 0.00 0.03 0.84
1 ‐ ((sum(‐x$posterior*log(x$posterior)))/(nrow(x$posterior)*log(ncol(x$pos
terior))))
}
27
Having decided for the 5-class model, we can inspect the model parameters. Below is a
shortened output.
m5r
(...)
##
## Estimated class population shares
## 0.2908 0.3073 0.143 0.0718 0.1872
##
## Predicted class memberships (by modal posterior prob.)
## 0.3179 0.2813 0.1392 0.0737 0.1879
(...)
In the first part of the output, poLCA gives us the class-specific response probabilities per
indicator and category. For example, teachers in Class 1 have a 98 % probability of having
probability. Next, the output contains the latent class sizes in two forms: as estimated class
population shares and based on modal class assignment. Both types of values are quite close as
they should be. For class interpretation, poLCA provides a 3D-barplot of the conditional item
response probabilities (SOM). This plot is hard to read, however, especially with growing
variables, a profile plot of the conditional item probabilities is better suited for interpretation
(Fig. 5).
development activities (simulated data and adapted figure based on Richter et al., 2013); CK =
content knowledge, PCK = pedagogical content knowledge, TLM = teaching and learning
discipline, ILS = individualized learning support, CSP = counseling students and parents, KKY
Following Richter et al. (2013) the classes can be interpreted as high on all activities (Class
1, 29.1 %), high on activities focusing (pedagogical) content knowledge and teaching methods
(Class 2, 30.7 %), high on activities focusing general pedagogical topics (Class 3, 14.3 %),
high on activities focusing teaching methods (Class 4, 7.2 %), and low on all activities (Class
5, 18.7 %). Note that, due to sampling error, the class sizes estimated from our simulated data
Two more points are noteworthy. First, the order of classes in any mixture model is arbitrary
and, thus, may change over a series of models, software used etc. That is, Class 1 from a given
solution, may be Class k in another. The order of classes can be adjusted by providing respective
starting values to the estimation algorithm (SOM). In the above output, classes are reordered to
match results reported in Richter et al. (2013). Second, a closer inspection the output reveals
that Class 4 has boundary conditional probabilities on the indicator CK (1 and 0 for no and yes,
respectively). Finding many such boundary estimates may be a warning sign that the model
solution is invalid or that too many classes have been extracted (Geiser, 2013). Even a single
one should be a cause for caution. In general, boundary values may be legitimate estimates but
they can also be an indication of model misspecification. In the present example, the respective
population value for the simulation was p = .98 which already is close to the upper bound of
Finally, a check of how well LCA recovered individuals’ true class membership shows only
an 85 % correct classification rate with misclassification being particularly apparent for Class
4 (SOM). This reduced accuracy may be due to the classes not being well separated from the
outset, as hinted by the suboptimal entropy value. Hence, this example may serve as a caveat
that even in solutions that seem reasonable in terms of fit and interpretation a non-trivial degree
4 Conclusion
statistical software using simulated examples of real research. As demonstrated, LPA/LCA are
effective analytic techniques for identifying unobserved subgroups that can help researchers to
investigate individual differences in learning, among other interests. Modern software as well
as methodological advances have greatly facilitated the use of these analytic techniques for
applied researchers.
30
Despite the great potential of mixture models some cautionary words are in order. First, as
elaborated in this chapter, some aspects of mixture modeling are inevitably exploratory. This
should humble researchers in drawing overly strong conclusions from them. In the same vein,
readers will have recognized that mixture modeling is a complex process that requires a
multitude of decisions and, thus, provides great researcher degrees of freedom. The analytic
results can be quite sensitive to these choices and decisions. Therefore, it is crucial to work out
a solid and principled plan ahead of the analyses, including a specification of the criteria for the
various decisions to make. Otherwise, there is a substantial danger of getting lost in the analytic
Second, several fallacies in the interpretation of mixture models are to avoid. As Loken and
Molenar (2007) note, “(…) successfully applying a mixture model does not immediately
confirm the appropriateness of the model” (p. 278). That is, finding a relatively best fitting
model within a series of candidate models neither implies that the model is statistically good in
an absolute sense nor that it is a substantively correct representation of the phenomenon in the
population. Moreover, results from a mixture model cannot provide sufficient evidence to
confirm that the construct of interest indeed is categorical in nature (Loken & Molenar, 2007;
Masyn, 2013). Above I have emphasized that, conceptually, person-centered and variable-
centered analyses look at two sides of the same coin. The statistical counterpart of this is that –
though factor and mixture models are not completely equivalent – “(…) a k-group mixture (or
latent profile) model can be redescribed as factor model with k-1 factors that is identical up to
first- and second-order moments” (Loken & Molenar, 2007, p. 293). Finally, as with other latent
variable models, the reification-fallacy should be avoided. Reification occurs when abstract
concepts represented by latent variables are taken too literally and are interpreted as if they had
a real, physical existence (Agresti, 2019; Bauer, 2007). Just because one successfully identified
latent classes and attached labels to them does not mean that these classes exist in the real world.
31
In many cases, latent classes should be seen as statistical summaries that identify persons with
similar response patterns and, thus, can be helpful interpretative tools. However, such analytic
summaries are insufficient evidence to make the case that a specific typology has a concrete
reality or that an individual is of a certain naturally occurring type (Bauer, 2007; Masyn, 2013).
There is a wealth of alternatives to the software introduced in this chapter. Many R packages
relevant for mixture modeling are listed on the Cran Task Views Psychometric Models and
Mplus and Latent Gold are easy to use, can estimate a broad array of mixture models, and
introduction to mixture modeling using Mplus is available, for example, in Wang and Wang
(2020). For Latent Gold, instructive user guides are freely available on the software’s website.
These and other software options are reviewed in Haughton et al. (2009), Hickendorf et al.
For delving more deeply into mixture models, the following selected sources may be of
interest: Highly readable introductions can be found in Collins and Lanza (2010), Masyn
(2013), and Vermunt and Magidson (2002). Systematic, though more technically challenging,
overviews are available in Hancock and Samuelsen (2008), Hancock et al. (2019), McLachlan
and Peel (2000), Muthén (2008), and Sterba (2013). The edited volumes by Hagenaars and
McCutcheon (2002), and Rost and Langeheine (1997) contain high quality illustrative
applications (mostly of LCA) from a broad range of disciplinary and substantive perspectives.
References
Asparouhov, T., & Muthén, B. (2014). Auxiliary variables in mixture modeling: Three-step
Asparouhov, T., & Muthén, B. (2015). Residual associations in latent class and latent transition
https://doi.org/10.1080/10705511.2014.935844
Asparouhov, T., & Muthén B. (2021). Auxiliary variables in mixture modeling: Using the BCH
method in Mplus to estimate a distal outcome model and an arbitrary second model
Bakk, Z., & Kuha, J. (2021). Relating latent class membership to external variables: An
https://doi.org/https://doi.org/10.1111/bmsp.12227
https://doi.org/10.1080/00273170701710338
Bauer, J., Gartmeier, M., Wiesbeck, A. B., Moeller, G. E., Karsten, G., Fischer, M. R., &
https://doi.org/https://doi.org/10.1016/j.lindif.2017.11.002
Bauer, J., & Mulder, H. R. (2013). Engagement in learning after errors at work: enabling
conditions and types of engagement. Journal of Education and Work, 26(1), 99-119.
https://doi.org/10.1080/13639080.2011.573776
Bauer, J. & Prenzel, M. (2021). For what educational goals do preservice teachers feel
Bauer, & T. Lovat (Eds.), The international handbook of teacher ethos: Strengthening
https://doi.org/10.1017/S095457949700206X
Collins, L. M., & Lanza, S. T. (2010). Latent class and latent transition analysis. Wiley.
Finch, W. H., & Bronk, K. C. (2011). Conducting confirmatory latent class analysis using
https://doi.org/10.1080/10705511.2011.532732
Gillet, N., Morin, A. J. S., Mokounkolo, R., Réveillère, C., & Fouquereau, E. (2020). A person-
centered perspective on the factors associated with the work recovery process. Anxiety,
Hagenaars, J. A., & McCutcheon, A. L. (Eds.). (2002). Applied latent class analysis. Cambridge
University Press.
Hancock, G. R., Harring, J. R., & Macready, G. B. (Eds.). (2019). Advances in latent class
analysis. IAP.
Hancock, G. R., & Samuelsen, K. M. (Eds.). (2008). Advances in latent variable mixture
models. IAP.
Haughton, D., Legrand, P., & Woolford, S. (2009). Review of three latent class cluster analysis
packages: Latent Gold, poLCA, and MCLUST. The American Statistician, 63(1), 81-
91. https://doi.org/10.1198/tast.2009.0016
Hickendorff, M., Edelsbrunner, P. A., McMullen, J., Schneider, M., & Trezise, K. (2018).
latent profile, and latent transition analysis. Learning and Individual Differences, 66, 4-
15. https://doi.org/https://doi.org/10.1016/j.lindif.2017.11.001
Hong, W., Bernacki, M. L., & Perera, H. N. (2020). A latent profile analysis of undergraduates’
https://doi.org/10.1037/edu0000445
Jung, T., & Wickrama, K. A. S. (2008). An introduction to latent class growth analysis and
growth mixture modeling. Social and Personality Psychology Compass, 2(1), 302-317.
https://doi.org/https://doi.org/10.1111/j.1751-9004.2007.00054.x
Kunst, E. M., van Woerkom, M., & Poell, R. F. (2018). Teachers’ goal orientation profiles and
111. https://doi.org/10.1007/s12186-017-9182-y
Linzer, D. A., & Lewis, J. B. (2011). poLCA: An R package for polytomous variable latent
https://doi.org/10.18637/jss.v042.i10
Little, T. D., Slegers, D. W., & Card, N. A. (2006). A non-arbitrary method of identifying and
scaling latent variables in SEM and MACS models. Structural Equation Modeling: A
Loken, E., & Molenaar, P. (2008). Categories or continua? The correspondence between
93177-7
Masyn, K. (2013). Latent class analysis and finite mixture modeling. In T. D. Little (Ed.), The
University Press.
Muthén, B. (2008). Latent variable hybrids: Overview of old and new models. In Hancock, G.
R., & Samuelsen, K. M. (Eds.), Advances in latent variable mixture models (pp. 1-24).
IAP.
35
Muthén, L. K., & Muthén, B. O. (1998-2017). Mplus user's guide (8th ed.). Muthén & Muthén.
Nylund, K. L., Asparouhov, T., & Muthén, B. O. (2007). Deciding on the number of classes in
latent class analysis and growth mixture modeling: a monte carlo simulation study.
https://doi.org/10.1080/10705510701575396
Nylund-Gibson, K., Grimm, R. P., & Masyn, K. E. (2019). Prediction from latent classes: A
https://doi.org/10.1080/10705511.2019.1590146
Oberski, D. (2016). Mixture models: Latent profile and latent class analysis. In J. Robertson &
M. Kaptein (Eds.), Modern statistical methods for HCI (pp. 275-287). Springer.
https://doi.org/10.1007/978-3-319-26633-6_12
Pastor, D. A., Barron, K. E., Miller, B. J., & Davis, S. L. (2007). A latent profile analysis of
Peugh, J., & Fan, X. (2013). Modeling unobserved heterogeneity using latent profile analysis:
R Core Team (2021). R: A language and environment for statistical computing. R Foundation
Richter, D., Engelbert, M., Weirich, S., & Pant, H. A. (2013). Differentielle Teilnahme an
Rosenberg et al., (2018). tidyLPA: An R package to easily carry out latent profile analysis
Rost, J., & Langeheine, R. (Eds.). (1997). Applications of latent trait and latent class models in
Scrucca, L., Fop, M., Murphy, T. B., & Raftery, A. E. (2016, Aug). mclust 5: Clustering,
classification and density estimation using Gaussian finite mixture models. The R
Scrucca, L., & Raftery, A. E. (2015). Improved initialisation of model-based clustering using
Gaussian hierarchical partitions. Advances in Data Analysis and Classification, 9(4), 447-
460. https://doi.org/10.1007/s11634-015-0220-z
Tofighi, D., & Enders, C. K. (2008). Identifying the correct number of classes in growth mixture
Vermunt, J. K., & Magidson, J. (2002). Latent class cluster analysis. In J. A. Hagenaars & A.
L. McCutcheon (Eds.), Applied latent class analysis (pp. 89–106). Cambridge University
Press.
Vermunt, J. K., & Magidson, J. (2016). Technical guide for Latent GOLD 5.1: Basic, Advanced,
Wang, J., & Wang, X. (2020). Structural equation modeling: Applications using Mplus (2nd
ed.). Wiley.