Hi, I've finished an analysis and want to write the Cprob and Cluster variables to an output file including the subject ID number. I was able to get the CProb and Cluster variables in a .dat file but these were not linked to the subj ID. Can you correct my syntax to include the subject ID number (residno)- only applicable parts of syntax pasted below. Thanks.
VARIABLE: NAMES ARE residno psy_del agit_agg refus_re call_out anxiety depress withdr_l sleep_do delir_LO; USEVARIABLES ARE psy_del - sleep_do ; CATEGORICAL ARE psy_del-sleep_do ; CLASSES = cluster(3);
SAVEDATA: FILE IS "threeclass.dat"; SAVE IS CPROB;
I am running an LPA using the code below. The MPlus output file states that it has processed and assigned 1198 cases to the classes. However, when I pull the .sav file into SPSS (the file created with the SAVEDATA command) only 874 have numeric values for class membership. The 324 other cases are assigned missing values. There appears to be a disconnect between what the MPlus output file is reporting and the file that the SAVEDATA command generated. Any help would be greatly appreciated.
TITLE: lpa-2 classes
DATA: FILE C:\SCOTT\Grants\LONGSCAN\LPA\MALTX_053107.dat; FORMAT IS FREE;
This is an Mplus support question. Please send your input, data, output, saved data, and license number to email@example.com.
Feifei Li posted on Wednesday, September 17, 2008 - 2:24 pm
I have a question regarding Lo-Mendell-Rubin (LMR) test. When I save result by using "savedata" options, I can only get BIC, AIC, Entropy such regular goodness of fit statistics for mixture model in a compact form of data. How can I also include LMR in this small .dat file?
Michelle posted on Thursday, August 06, 2009 - 8:42 am
Hi - I am having a similar issue to Scott who posted 6-7-08. I am using MPlus for an LCGA-survival analysis and would like to import the cprob data into STATA for further analysis. Two problems seem to arise: 1) there is a disconnect between what the MPlus output reports as the class assignment and what shows up in the ASCI file. For instance, MPlus reports in the output file that there are approximately 900, 400, and 2100 people in each of three classes based on the most likely class assignment; however, when reading the data into STATA, I ask for a count of the various classes, and it reports a nearly even ~1100, ~1000, ~1300 split of the different classes. I can't figure out this discrepancy. Secondly, even though I have specified the ID Variable in the VARIABLE portion of the command, it still seems to be reporting it incorrectly in the data file. I have ~3600 cases in the dataset, and at case 1100, everyone from 1100 to 1199 gets 1100 as their ID variable; then the next 100 get 1200, and so on. I have been able to determine that the data are still in case id order (based on the other variables in the dataset) and so was able to just add an extra field that replicates the case id, but I am curious if there is a different solution to this.
Hello I am running a LCA with 3 clusters and nominal indicators, and want to save the cprob data. When I run the analysis the output says the data file has been saved, but the file is nowhere to be found. I have tried this for a number of cluster solutions and the same problem exists. I have done LCA before and the data has saved before. I am wondering if I am doing anything wrong. I am using:
If the data are not saved, there should be a message in the output. Or perhaps you are trying to write to a directory where you don't have write privileges. If you cannot figure this out, send your input, data, and license number to firstname.lastname@example.org.
I am sorry if I missed the simple answer to this somewhere. In the Plot commands I can plot observed or estimated variables. What I really want to do is SAVE the estimated variables. I.e. predicted values for each individual in the data. Is there an easy way to do this with the SAVEDATA command or do I have to program hand equations to estimate predicted values?