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?
AT Jothees posted on Sunday, March 19, 2017 - 12:25 am
I have no problem in using the save command, but I have difficulties in understanding the variables in the saved data files.
In the mplus OUTPUT,I see list variables and their names specified. But when I open the saved file, I see several additional variables. I don't understand why there are additional variables in the saved file other than the list mentioned in the output file.
I just wanted to save the factor scores, indicator variables and the ID variable in the new file with no additional variables. Is this possible?
Many thanks in advance
AT Jothees posted on Monday, March 20, 2017 - 1:54 am
Hi I am running an LCA with 431 observations. However the Mplus output says there are only 407 observations and this is how it is in the saved data file. I can't figure out why the remaining 24 observations have not been processed. I don't have so many missing values. Also when I open the saved file (in txt) I can see that none of the observations have values 4 or 5 while in the original data (ie. with 431 observations), there are several observations with 4 and 5 values. The codes I have used are given below:
Categorical are A82-A88; Usevariables are A82-A88; Missing are all (-9); Classes = c(3);
Analysis: type = mixture;
Output: Tech11; Tech14; Savedata: File is LCA.txt; Save is cprob; format is free;
The output should tell you which 24 observations are not included (e.g. because all Usev variables have missingness for these 24). If this doesn't help, send your output and data to Support along with your license number.