Id variables and number of classes PreviousNext
Mplus Discussion > Latent Variable Mixture Modeling >
Message/Author
 Yemi posted on Sunday, November 14, 2010 - 2:43 am
I have three quick questions:

I have an id variable that goes from 6-9 digits. However for anything over 8 digits, the id number is rounded, and my id is no longer unique. Can I increase the format of my id number in the save variables command and how do I do that?


Secondly: I am running a latent class model with covariates. The number of individuals in each class changes with the number of covariates I add, as does the slope of the classes when I look at the graphs. I am just wondering the intuition behind this.

Thirdly, is it possible to control for individuals that belong to the same household (clustering) in the latent class model?


Thanks.
 Linda K. Muthen posted on Monday, November 15, 2010 - 4:42 pm
Older versions of the program had a limit on the number of digits for the ID variable.

When the addition of covariates changes the classes, this may point to a need for direct effects from the covariates to the latent class indicators. See the following paper which is available on the website:

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.

Related to multilevel latent class analysis see the following paper which is available on the website:

Henry, K. & Muthén, B. (2010). Multilevel latent class analysis: An application of adolescent smoking typologies with individual and contextual predictors. Structural Equation Modeling, 17, 193-215.
 Caitlin Elsaesser posted on Tuesday, February 03, 2015 - 1:17 am
Hello. I have a question about saving the ID variable. I have run a LCA and I want to save the conditional probabilities for classes. I specified the following command:

SAVEDATA:
FILE = Classes.dat;
MISSFLAG=-99;
SAVE = CPROB;

Additionally, in the VARIABLE section, I specified

IDVARIABLE = V1;

However, when I run this, I get the following error:

*** ERROR
The number of observations is 0. Check your data and format statement.
Data file: Q1.02.02-15.MISS-99.dat
*** ERROR
Invalid symbol in data file:
"Ôªø126" at record #: 1, field #: 1

The data saves, but without an ID variable. I have checked the data, and the data is fine. The identifier variable ranges from 126 to 90,000. I tried recoding the identifier variable to all be four digits and this didn't seem to chance anything. I would love some help here, as I can't use the saved data without being matched to identifiers.

Thank you!
 Linda K. Muthen posted on Tuesday, February 03, 2015 - 11:57 am
Open the data set in the Mplus Editor. You will see that character at the beginning of the data set. Delete it and resave the data.
 C. Gantz posted on Tuesday, February 03, 2015 - 1:24 pm
Dear Linda,

Thank you for your quick response. When I go into MPLUS editor and use the open command, I only have the option to open input or output files. Perhaps this is because I am using the MPLUS editor in a Mac. But it doesn't appear I can open the data in MPLUS editor. Do you have any other suggestions?

Best wishes, Caitlin
 Linda K. Muthen posted on Wednesday, February 04, 2015 - 5:03 pm
You can open the data file with any Mac text editor.
 C. Gantz posted on Wednesday, February 04, 2015 - 7:04 pm
Dear Linda,

Thank you, that did the trick! One other reader question: I asked for a graph, which came out in a .gh5 format. From what I have read, this is an R file - does this mean I need the program R to open this file, or is there another way? I am working on a Mac.

Best, Caitlin
 Bengt O. Muthen posted on Wednesday, February 04, 2015 - 9:24 pm
You have to use R. Our website has R plotting examples.
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: