Data Exportation with Latent-Class Mo... PreviousNext
Mplus Discussion > Latent Variable Mixture Modeling >
Message/Author
 Anonymous posted on Sunday, November 20, 2005 - 7:28 am
I am trying to develop a study that uses latent classes with cross-sectional data. The issue that I have is that I want to export my data after the optimal number of classes have been found in the data. This will allow me to examine mean differences in specific variables.

For example, I want to examine the latent classes of scholastic aptitude. After finding the optimal number of classes in my sample, I want to know the mean differences in mean math scores. To understand the mean differences in math scores, I need to run MANOVA in a different program. However, I want Mplus to provide me with an indication of the individuals in each group so that I can use that in my MANOVA. How do I do this in Mplus? Is it a "savedata", "results", or "estimates" command? Better yet, can this be done? Thanks
 Linda K. Muthen posted on Sunday, November 20, 2005 - 9:56 am
You can save posterior probabilities by using the CPROBABILITIES option of the SAVEDATA command. Are you interested in looking at mean differences between variables other than those that you used in the latent class analsyis or the ones you used in the latent class analysis?
 Anonymous posted on Sunday, November 20, 2005 - 1:46 pm
I'm trying to figure out which individual is in which group in the data. This way I can perform other analyses with the data. So, I am interested in variables that have not been used in the latent class analysis. Does Mplus put the cprobabilities with the individual observation?
 Anonymous posted on Sunday, November 20, 2005 - 1:50 pm
With this problem, I'm trying to identify the individuals in the latent class count. How can identify these individuals in the dataset?
 Linda K. Muthen posted on Sunday, November 20, 2005 - 3:20 pm
You can save the posterior probabilities using the CPROBABILITIES option of the SAVEDATA command. Note that the posterior probability for each individaul for each class will be saved as will the individual's most likely class membership.
 Salma Ayis posted on Thursday, May 25, 2006 - 1:22 am
I am using Mplus to fit a Latent class model, by default I can get the CPROBABILITIES in the output saved file(SPSS), in fact I need to have my original data in addition to the results. For example if I used u1-u4 g; as my categorivcal indicators and my id I would like a complete data that have u1-u4 g & cprobabilities. This would save me from any chances of error in assigning d's to class membership. I tried to add these to SAVE dtat command but it didn't seem right!. Suggestions please! Thanks
 Linda K. Muthen posted on Thursday, May 25, 2006 - 6:08 am
Use the AUXILIARY option of the VARIABLE command to list variables not in the analysis that you want to save. Use the IDVARIABLE option of the VARIABLE command to identify the id variable. Use the CPROBABILITIES option of the SAVEDATA command to save posterior probabilities.
 Michael A Ghebre posted on Wednesday, January 30, 2013 - 6:19 am
Dear All
I fit my model using Factor Mixture Model (3 latent classes & 3 factors), and manage to get reasonable number of subjects within each class. However, I could able to get conditional probability and graphs information only for the first class. This is only happened when I use explanatory factor analysis (efa), but it is okay with confirmatory factor analysis (cfa).
Here is the code I have used:-

IDVARIABLE IS id;
Usevariables are Y1-Y16;
classes=c(3);

ANALYSIS:
TYPE = MIXTURE MISSING efa 1 3;
ALGORITHM=INTEGRATION;
ESTIMATOR=MLR;
STARTS 365 10; STITERATIONS 10;
STSEED 1234;
PROCESS = 2(STARTS);
Plot: type is plot3;
series = Y1-Y16 (*);

Savedata: file is "C:\ latentClassAnalysis"

SAVE = CPROBABILITIES;
format is free;
output: tech1 tech8 tech11 tech14;


I would be very grateful if you could kindly help me with this issue!
Thanks
Michael
 Linda K. Muthen posted on Wednesday, January 30, 2013 - 7:17 am
Please send the output and your license number to support@statmodel.com.
 Sarah Landsman posted on Thursday, December 18, 2014 - 6:01 am
I am trying to export data from a growth mixture model using the CPROBABILITIES option of the SAVEDATA command into a csv file but the file is saving all of the variables in the first cell of the csv file rather than each variable being exported into its own column. Is there a way to specify this command to receive the data in separate columns or in a comma delimited text file? Below is my current syntax.

Savedata:
save=cprob;
file=cprob_binhvy_GMM_2class.csv;
 Linda K. Muthen posted on Thursday, December 18, 2014 - 9:55 am
Don't use the csv extension. The file that is saved is an ASCII file. Use another extension, for example, txt.
 Jan posted on Sunday, May 17, 2015 - 9:37 am
I wanted to save probabilities in a growth mixture model. IAD is the intercept factor and SAD is the slope factor. The following variables were extracted:

IAD F10.3
SAD F10.3
C_IAD F10.3
C_SAD F10.3
CPROB1 F10.3
CPROB2 F10.3
CPROB3 F10.3
CPROB4 F10.3
C F10.3

I know that IAD and SAD are scores of the intercept and the slope factor, and CPROB-C are probabilities and most likely membership. But could you tell me what the C_IAD and C_SAD are?
 Seth Frndak posted on Tuesday, October 27, 2015 - 7:33 am
I have a theoretical question regarding exporting class membership for further analysis.

If the entropy level is low (say 0.60), would that suggest caution in exporting these classes? This would suggest a great deal of error in class membership correct? What level of entropy would be acceptable for this kind of post-LCA analysis?
 Jon Heron posted on Tuesday, October 27, 2015 - 9:26 am
Hi Seth

this threshold continues to be pushed upwards. My vote would be for 0.9 but even then you are not necessarily home and dry.

Safer to stick to one-step/r3step/DCAT/etc.
 Jin Qu posted on Saturday, August 11, 2018 - 8:30 pm
Dr. Muthen,

I used the LPA model with 7 indicators (conflict_pre, conflict_6m, conflict_1y, MS_6m, MS_N_6m, MS_1y, MS_N_1y) and I saved the plot data from the Mplus graph and did separate graphs in excel. However, recently I notice that the plot data that I obtained from Mplus was different from the variable/indicator means for each class membership that I obtained in spss. The MS_N_1y (last indicator) values were more off (lower than the mean) than other indicators. I wonder what the Mplus plot data really means and which data I should use to plot the graphs. Also is there a way to calculate mean differences within and across lpa profiles using the Mplus Plot Data without having to force a participant into a membership and do a repeated measure test or a paired t-test in spss? I appreciate your help on this issue.
 Bengt O. Muthen posted on Monday, August 13, 2018 - 9:34 am
Perhaps you have missing data on your last indicator in which case Mplus uses the multivariate information from all indicators to estimate the mean - perhaps SPSS uses only that variable's information.

You can express any mean difference using the Model Constraint command and parameter labels given in the Model command. See UG examples for Model Constraint.
 Bhuban Dhakal posted on Wednesday, March 20, 2019 - 1:35 pm
Hi Mplus help team

I got substantial sample proportion changes between classes in the result of the first stage (identified based on primary indicators) and the classes of the second stage (accounting effects of covariats including distal outcomes) when I followed BCH method in identifying latent classes. We are interested to make further analysis to understand distribution pattern of the covariats between the final classes. We needed classified data of individual samples from the second step. Mplus v8 did not save the class related data of individual samples. Evaluating the covariats' distribution between classes based on output data of the first step can be erroneous. My questions: a) Is there any Mplus code which can save classes information estimated in the final stage for individual sample? If Yes, what would it be? b) if No, will you develop/ have you developed the facility in new version of Mplus?

I have an in-perpetuate Mplus use licence but technical support licence has been expired. Thanks.
B. Dhakal
 Jen Doty posted on Monday, October 12, 2020 - 10:03 am
Hello,

I'm exporting cprobabilities from a latent profile analysis, but the variable with the most likely class membership is not showing up in the exported dataset. Typically it is the last variable, but it is missing. Any ideas on why that may be?
 Bengt O. Muthen posted on Monday, October 12, 2020 - 12:02 pm
That sounds stange. We have to see your output and saved cprobs to diagnose this - send to Support along with your license number.
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: