Latent class analysis with covariates PreviousNext
Mplus Discussion > Latent Variable Mixture Modeling >
Message/Author
 Gary Chan posted on Wednesday, February 01, 2012 - 9:40 pm
Hi,

I ran a latent class analysis on ten items (says, D1-D2) with two covariates (X1 and X2). The followings were the estimated proportion of each class.

FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASS PATTERNS
BASED ON ESTIMATED POSTERIOR PROBABILITIES

Latent
Classes

1 137.77276 0.09855
2 589.86515 0.42194
3 670.36208 0.47952

CLASSIFICATION QUALITY

Entropy 0.821

I got very different estimates for class proportion when I ran the LCA without the covariates. The followings were the estimated proportion of each class.

FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASS PATTERNS
BASED ON ESTIMATED POSTERIOR PROBABILITIES

Latent
Classes

1 28.24309 0.02014
2 1116.58716 0.79642
3 257.16975 0.18343

CLASSIFICATION QUALITY

Entropy 0.907


Can anyone advise why this happen and how I should deal with this? It seems to me that the result from the LCA without the covariates is more correct and align with the substantive theory in my research question.

Thank you very much!
 Linda K. Muthen posted on Thursday, February 02, 2012 - 9:41 am
When this happens, it points to the need for direct effects between the covariates and latent class indicators. See the following paper which is available on the website for a discussion of this:

Muthén, B. (2004). Latent variable analysis: Growth mixture modeling and related techniques for longitudinal data. In D. Kaplan (ed.), Handbook of quantitative methodology for the social sciences (pp. 345-368). Newbury Park, CA: Sage Publications.
 Gary Chan posted on Thursday, February 02, 2012 - 6:46 pm
Thank you very much Prof. Muthen.

I have one more question regarding covariates in LCA.

For example, I now want to predict the latent class membership with 5 predictors (X1- X5).

There are some missing values in some of the variables, says X1 and X2. When I ran my model, mplus excluded them from the analysis. I have already used the command

Analysis:
Type=mixture missing;

Can you please advise how I can include cases with missing value in my model?

Thank you very much!

Best regards,
Gary
 Linda K. Muthen posted on Friday, February 03, 2012 - 7:33 am
Missing data theory does not apply to observed exogenous covariates. If you don't want to lose the cases, you can mention the variances of your covariates in the MODEL command. Then they will be treated as dependent variables and distributional assumptions will be made about them.
 Michael T Weaver posted on Friday, March 29, 2013 - 1:16 pm
This is probably a naïve question related to my limited understanding of what happens in latent class (or latent profile) analysis.

I identified a reasonable grouping of 6 continuous variables into 4 latent classes (MPLUS version 7).

I was wondering if parameter estimates for classification equations are produced, and, if so, how to view them, so that probability of group membership can be estimated in other samples - like can obtain with a discriminant classification analysis.

I could not find guidance in the MPLUS manual or on web site, and such may not be possible.

Any guidance as to how or whether this is possible appreciated. Thanks!

Michael
 Bengt O. Muthen posted on Friday, March 29, 2013 - 2:35 pm
You can save the parameter estimates from your 4-class run using SVALUES. With a new sample - which can be just one person if you like - you can then change * to @ for the SVALUES so that you fix every parameter and use the analysis only to get posterior probabilities for the person(s) in the new sample.
 Michael T Weaver posted on Friday, March 29, 2013 - 4:02 pm
Thank you very much!

That was what I was missing!
 Sarah Dermody posted on Wednesday, August 28, 2013 - 5:50 am
Can latent variables be examined as predictors of latent class membership? If so, should the latent variables be defined in the %overall% command or elsewhere? When I define a latent variable in the %overall% command and then include the latent variable as a covariate (5 class model) I receive the following error message. I do not receive this message when I use the latent variable indicators as covariates (i.e., not as a latent variable).

*** ERROR The following MODEL statements are ignored:
* Statements in the OVERALL class:
C#1 ON INTERN
C#2 ON INTERN
C#3 ON INTERN
C#4 ON INTERN
 Sarah Dermody posted on Wednesday, August 28, 2013 - 7:47 am
Please ignore my question. I was able to resolve the issue by adding algorithm = integration to my analysis syntax. Thank you!
 RuoShui posted on Wednesday, November 06, 2013 - 3:15 am
Hello Dr. Muthen,

I want to conduct latent class analysis using students' responses to four constructs. Each construct was measured by four continuous indicators. I am wondering should I use 16 items or should I use 4 mean scores as indicators for my LCA?

Thank you very much.
 Bengt O. Muthen posted on Wednesday, November 06, 2013 - 11:02 am
Either approach is ok. With 16 items you can also include the 4 factors in the mixture model. Using 16 items you probably get more classes so if you want to keep it simple you use the 4 scores (assuming that you are sure the items follow a 4-factor model).
 Alvin posted on Wednesday, November 13, 2013 - 10:59 pm
Hi Drs Muthen,

I have a 3-class LCA and I am regressing classes 1 and 2 on V1. I notice "reference to the slopes for the final class could not be done". Does Mplus treat the final class (class 3 in this case) as the reference group? Also is it possible to change the default reference group? Ideally I'd like to regress class 1 and 3 with 2 being my reference group. Many thanks
 Linda K. Muthen posted on Thursday, November 14, 2013 - 6:17 am
Yes, the last class is the reference class. You can reorder the classes using starting values. Ask for the SVALUES option of the OUTPUT command and change the class numbers to what you want them to be. Use STARTS=0 when you estimate the model with starting values.
 RuoShui posted on Monday, November 25, 2013 - 8:26 pm
Dear Dr. Muthen,

I want to run LCA using factors with indicators, but I am having problems with the syntax. Would you please let me know what is the problem with the following syntax?
Thank you very much.

USEVARIABLES ARE
a1 a2 a3 a4 b1 b2 b3 b4 c1 c2 c3 c4 d1 d2 d3 d4;
classes = c (2);

Model:
E1 BY a1 a2 a3 a4;
E2 BY b1 b2 b3 b4;
E3 BY c1 c2 c3 c4;
E4 BY d1 d2 d3 d4;

Analysis: Type=Mixture;
Plot: Type is plot3;
series is E1 (1) E2 (2) E3 (3) E4 (4);
Output: standardized;
 Linda K. Muthen posted on Tuesday, November 26, 2013 - 6:20 am
You need %OVERALL% in the MODEL command for TYPE=MIXTURE. See examples in Chapter 7 of the user's guide.
 Peter Rivera posted on Friday, November 06, 2015 - 5:44 pm
Greetings,
I am attempting to relate classes of maltreatment (time 1) to classes of intimate partner violence (time 2) through a 3-step approach. Subsequently to fitting separate latent class models, I used the posterior probabilities from the maltreatment latent variable to create dummy variables representing most likely latent class membership and modeled them as covariates to the intimate partner violence model using the 3-step approach. I have a few questions: (1) How would you interpret the odds ratios (the probability of being in an intimate partner violence class (vs. an intimate partner violence reference class) as a function of being in a substance abuse class (vs. a maltreatment reference class))? (2) Are there any inherent problems with using this approach? (3) Do you know of any published studies that used this or a similar approach? Any insight you are willing to share will be appreciated. Thanks.
 Peter Rivera posted on Friday, November 06, 2015 - 5:48 pm
*Typo in the last message: In question #1 I meant maltreatment class not substance abuse class.
 Bengt O. Muthen posted on Monday, November 09, 2015 - 4:50 pm
(1) You can use the logic used for transitions in LTA as described in the web note on our web site:

Muthén, B. & Asparouhov, T. (2011). LTA in Mplus: Transition probabilities influenced by covariates. Paper can be downloaded from here. Mplus Web Notes: No. 13. July 27, 2011.

(2) No.

(3) None comes to mind.
 Sherry posted on Sunday, October 20, 2019 - 2:39 pm
Dear Dr.Muthen,

I have a question regarding the Monte Carlo counterpart for example 7.12 in the Mixture section from the User Guide. For the model population command:

model population:

c#1 on x*1;

u4 on x*.5;

I understand these represent multinomial logistic regressions. However, why were values specify for the covariate and why different values? I would really appreciate if you could explain the conceptual idea of these two lines.

Thank you.
 Bengt O. Muthen posted on Sunday, October 20, 2019 - 5:42 pm
The first line says that x increases the odds of being in class 1 compared to the last class. The second line says that there is also a direct effect of X on the probability of u4. The values are chosen to represent a possible scenario from which data are generated.
 Sherry posted on Monday, October 21, 2019 - 7:11 pm
Thank you. I have another question, how would I indicate a class varying direct effect on x on u4? Would it be something like

TITLE:
NMSim

MONTECARLO:
names are u1-u5 x;
generate = u1-u5(1);
categorical = u1-u5;
genclasses=c(2);
classes=c(2);
nobs=500;
seed=123;
nrep=1
repsave=all;
save=D:\NMSim\equalPB.dat;

ANALYSIS:
type=mixture;

model population:

%overall%

[x@0]; x@1;

[c#1*0]; !equal;

c#1 on x*1; !IDE gamma_11=1

u4 on x*0.5; !DE beta_41;

u4 on x*1.5; !DE beta_42;

%c#1%
[u1$1*1 u2$1*1 u3$1*-1 u4$1*-1 u5$1*-1];

%c#2%
[u1$1*-1 u2$1*-1 u3$1*1 u4$1*1 u5$1*1];

output:
tech9 tech11 tech14;
 Sherry posted on Monday, October 21, 2019 - 7:13 pm
Also, where in the output of the Monte Carlo does it indicate that the class-varying slope is estimated?

Thank you again.
 Bengt O. Muthen posted on Tuesday, October 22, 2019 - 4:59 pm
You have to put the statements

u4 on x*0.5; !DE beta_41;

u4 on x*1.5; !DE beta_42;

within their respective class c#1 and c#2. And fix the slope at zero in the Overall part.
 Sherry posted on Tuesday, October 22, 2019 - 7:03 pm
I believe I made the correct changes but errors still appear. Also I am told to add ALGORITHM=INTEGRATION to the analysis section. This is a categorical LCA simulation, is it necessary?

ANALYSIS:
type=mixture;

model population:

%overall%

[x@0]; x@1;

[c#1*0]; !equal class prevalances;

c#1 on x*1; !Indirect effect;

u4 on x*0.5; !DE slope=0.5;

c#2 on x*0; !slope=0;

u4 on x*1.5; !slope for class 2;

%c#1%
[u1$1*1 u2$1*1 u3$1*-1 u4$1*-1 u5$1*-1];

%c#2%
[u1$1*-1 u2$1*-1 u3$1*1 u4$1*1 u5$1*1];

output:
tech9 tech11 tech14;


*** WARNING in MODEL command
All variables are uncorrelated with all other variables within class.
Check that this is what is intended.
*** ERROR
The following MODEL POPULATION statements are ignored:
* Statements in the OVERALL class:
C#1 ON X
C#2 ON X
U4 ON X
U4 ON X
*** ERROR
One or more MODEL POPULATION statements were ignored. These statements may
be incorrect or are only supported by ALGORITHM=INTEGRATION.

Thank you.
 Bengt O. Muthen posted on Wednesday, October 23, 2019 - 1:44 pm
Your input needs a MODEL command part to say what kind of model you want to use to analyze the data generated by the Model Population command.
 Sherry posted on Wednesday, October 23, 2019 - 4:12 pm
I've included the MODEL command but I am getting an error:

*** ERROR in MODEL command
No reference to the slopes of the last class is allowed.
*** ERROR in MODEL POPULATION command
No reference to the slopes of the last class are allowed.

-----------------------

It's unclear to me why this error appears...

From Covariates in Mixture Modelling by Masyn and Nylund (2016), given 2 latent classes and if item u4 has measurement noninvariance and is class varying then:

P(u4=1|c=1,X=x) = 1/ 1 + tau_41-beta_41*x
P(u4=1|c=2,X=x) = 1 / 1+ tau_42-beta_42*x

then in my code
u4 on x*0.5 represent beta_41
u4 on x*1.5 represent beta_42

c#2 on x*0 was specify since it is the last class hence used for identification.

Is my understanding correct?
 Bengt O. Muthen posted on Thursday, October 24, 2019 - 11:22 am
We need to see your full output to say - send to Support@statmodel.com along with your license number.
 Gizem posted on Friday, October 16, 2020 - 3:59 am
Hi!

I'm conducting latent class analysis with the 3-step approach and have a question regarding auxiliary variables.

I defined depression level as an auxiliary variable, which I want to handle as a covariate in my model. I also want to define it as a categorical variable, but get the error that "an auxiliary variable cannot be listed as categorical".

What would be your suggestion in that case?

Thank you!
 Bengt O. Muthen posted on Saturday, October 17, 2020 - 3:11 pm
Treating a binary covariate as continuous is perfectly ok. You are just saying that the class percentages are different in the two categories. If it is ordinal and you really want to treat it as such, you have to do either single-step analysis or manual R3step as discussed in our web note 15.
Back to top
Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: