Paul Spin posted on Friday, December 01, 2017 - 3:19 pm
A relative newbie to Mplus...
I am attempting to model
Y= B0 + B1*LAS + B2*Z + error
where Y is a count variable, LAS is a latent class variable w/ 3 categories, and Z is a vector of covariates.
I am following Web Notes 21 [Section 3.2], which returns class-specific intercepts and slope for each Z. Instead, I would like to get class-independent main effects for Z while still allowing for class-specific intercepts.
Here is my code:
TITLE: STAGE 1: Estimate latent class model; DATA: File = data.csv ; VARIABLE: NAMES = y a1-a8 z; USEVARIABLES = a1-a8 ; CATEGORICAL = a1-a8; CLASSES = c(3); AUXILIARY = y z; ANALYSIS: TYPE = MIXTURE; Savedata: File = lcaoutput.csv ; Save = bchweights;
TITLE: Y on C and Z ; DATA: File = lcaoutput.csv: VARIABLE: NAMES = y a1-a8 z W1-W3 MLC; USEVARIABLES = y z W1-W3 ; CLASSES = c(3); Training = W1-W3(bch); ANALYSIS: TYPE = MIXTURE; MODEL: %Overall% C y on z; %c#1% y on z; %c#2% y on z; %c#3% y on z;
Q1: How to I modify the second input file to obtain what I described above? Q2: How do I test for statistically significant differences in the class-specific intercepts?
Q1: Try dropping the class-specific y on z statements. The intercept varies by class as the default.
Q2: Give parameter labels to the class-specific intercepts in the Model command, like:
%c#1% [y] (p1); %c#2% [y] (p2); %c#3% [y] (p3);
and then use Model Test to do Wald testing like testing if all 3 are the same:
0 = p1-p2; 0 = p3-p1;
Paul Spin posted on Wednesday, December 20, 2017 - 11:22 am
Thank you. I am running my analysis across various multiply imputed datasets. Is there a way to ensure class order stability across each dataset? In other words, I would like C=1 to denote class category 1 "No asthma" in each iteration.
Paul Spin posted on Wednesday, December 20, 2017 - 12:23 pm
I should add that removing the class-specific y-on-z's does not stop the program from estimating class-specific coefficients, which seems to imply that the MODEL TEST part is adjusted for main effects and class-specific interaction effects. I'd rather not condition on the latter.
Here is a snippet of my output file without the class-specific statements:
MODEL RESULTS Two-Tailed Estimate S.E. Est./S.E. P-Value
Latent Class 1 ABSENT ON GRADE_2 -0.040 0.152 -0.264 0.792 TARDIES ON GRADE_2 -0.070 0.224 -0.311 0.756
Latent Class 2 ABSENT ON GRADE_2 -0.040 0.152 -0.264 0.792 TARDIES ON GRADE_2 -0.070 0.224 -0.311 0.756
So, my follow-up questions are:
1) Does MPLUS estimate these coefficients using one large model with interactions or separate class-specific models. 2) Can I get what I want simply by adding grade_2@0 to the all but the first class-specific specification, i.e. imposing the assumption that there are no class-specific deviations in coefficients relative to the base class?