# Mixing variable types in latent class/profile analysis?

Is there a way to use both binary and continuous variables in latent class/profile analysis? (Class being binaries, and profile being continuous, not sure what to call this.)

My lone continuous variable is really important, and making it dichotomous does not make sense theoretically.

(P.S. I'm using Stata 15's new gsem commands.)

• "Mixed mode latent class analysis" is one term I've heard, FYI. Commented Mar 26, 2019 at 16:17
• Is this variable a predictor of class membership (a fixed characteristic like age or sex) or a symptom (like truancy with delinquency)? Commented Sep 16, 2021 at 0:52

Yes - below is an image taken from a LCA presentation by Chuck Huber from Stata. Note inclusion of a covariate.

You may be able to access the entire presentation from this link:

https://www.stata.com/training/webinar_series/latent-class-analysis/

Updated Response

Here is a general classification by indicator (manifest variable) and latent variable.

Indicator    Latent           Analysis
Variable    Variable          Name
------------------------------------------
continuous  continuous    = (Latent) Factor Analysis
continuous  categorical   = Latent Profile Analysis
categorical continuous    = Latent Trait Analysis (also IRT)
categorical categorical   = Latent Class Analysis

From general structural models we know that both continuous and categorical can be used to predict latent variables, i.e.,

continuous -> latent variable
categorical -> latent variable

The question is whether one can mix indicator variables of different types to form the latent variable, i.e.,

latent variable -> continuous + categorical indicator variables

The answer is yes, and the general framework is sometimes call latent structure analysis or mixture models. Here are introductions.

https://hummedia.manchester.ac.uk/institutes/methods-manchester/docs/lsa.pdf

Examples are shown in Mplus software. For instance, to see confirmatory factor analysis with both categorical and continuous indicators, see example 5.3 in user manual chapter 5.

https://www.statmodel.com/ugexcerpts.shtml


• I don't think this is correct. Covariates aren't actually part of the model itself, they're just used to predict class membership. Commented Sep 14, 2021 at 13:16

Maybe not. In the example given age is not used to define the classes, it is used to show how class membership probabilities vary by age.

It depends on what you mean by "using" a continuous variable, but technically I think the answer is actually no. By definition the "manifest variables" in an LCA (the observed variables that you theorize are measures the underlying latent construct) have to be categorical. The whole logic of LCA requires it, because the way it tells you what each class looks like is by giving an item response probability ("rho") for each category of each variable, for each class. So it will tell you (e.g.) that "an individual who answered "A" to Variable 1 has a 76% probability of being in Class 2." That whole approach won't work with a continuous manifest variable.

Another post noted that you can use continuous COVARIATES in an LCA model, but that's something different. The covariates aren't actually part of the model itself, but they are used to help predict the model more accurately. In other words, the covariates don't help define the nature of the latent variable itself, they just predict class membership. So even though you can include a continuous variable as a covariate, you aren't treating it as a measure of the latent variable. So if you want to actually use your continuous variable to actually construct the latent variable then you have to group it into some number of categories (although you can use more than 2, that's the beauty of LCA: a 3 or 4 or 5 category variable is fine).

• Why does LCA require the indicators to be categorical? If you're familiar with the likelihood function of LCA with binary items, it's the product of the probability of endorsing each indicator given a certain class, then times across all the classes. Why can you not substitute any density function in there? In fact, Stata does allow latent class/profile analysis with mixed indicator types, as does the R package flexmix. There may be others, I would suspect MPlus and Latent Gold of being capable of this but I don't have access to them. Commented Oct 1, 2021 at 21:27