Hi I am in the process of carrying out LCA and the model appears to be running ok. However, I am having difficulty saving the conditional probabilities- I get an error message in the output. Would appreciate any advice on this. Input and warning as follows:
Title: LCA for experience (5classes) Data: FILE IS modeldata.dat; FORMAT IS 124F7.0 11F7.2 20F7.0 1F7.2;
Variable: NAMES ARE id a1-a28 b1-b127; USEVARIABLES ARE a1-a28; CLASSES = c(5); CATEGORICAL ARE a1-a28;
You would get this message if the file is open or if the directory cannot be written to.
Hee-Jin Jun posted on Tuesday, February 06, 2007 - 8:03 pm
I used savedata command and got the data. but when I opened the data, there were '*' for missing (originally it was -999) and '**********' for id (originally id was 6 digit) How can I get the real numbers instead of ***.
My command was SAVEDATA: FILE IS BMI10C1_2.sav; format is delimited; SAVE = CPROB;
I used 'format is free' as well. It gave me the same result.
It seems that your id variable is too long. The asterisks indicate that it will not fit in the space provided. The default for missing is the asterisk. If you cannot figure this out, please send your input, data, output, and license number to firstname.lastname@example.org.
Hee-Jin Jun posted on Friday, February 09, 2007 - 4:46 pm
If my id number does not fit in the space provided, how many digits Mplus allows and is there any way that I can increase the digit?
You will need to shorten your id variable to no more than 7 digits.
Phil Wood posted on Friday, June 15, 2007 - 11:53 am
Here's a somewhat related question: I have an ID variable which contains alpha information (e.g., 198292A). Is there any way to save this alpha information in the savedata statement? I tried using IDVARIABLE to read the information in, (i.e., idvariable is dadid;) but when I save the data, the output doesn't contain the alpha variable. Thanks for any insights! (Alternatively, I guess a workaround is to case-merge the files afterward, but I'm, as always, lazy). thanks! Phil
For Mplus, all data must be numeric. There is no way around this. You could do a global change of A to 9 for example.
I'm surprised you don't get an error message. I added an A to a variable in a data set and I did.
MAH posted on Wednesday, August 06, 2008 - 10:04 am
My ID variable is 7 digits long, ranging from 0001502 to 2601602. Right now, when I save the data, 0001502 becomes 1502. I need to retain the leading zeros on the smaller numbers when I use the savedata command. How can I do this?
I have a question. I am conducting a LCA (mixture missing). When I save my data (class membership and other data), can I somehow override the default option for missing values (i.e., asterisks) and use a numerical value instead? I have a problem opening the dat. file in spss with asterisks.
There is not an option in the SAVEDATA command to change the missing data flag. If you want to do this, I suggest opening the file in the Mplus or some other editor and doing a global replace of the asterisk with another missing value flag.
Gareth posted on Wednesday, September 23, 2009 - 7:28 am
Could an option to change the default asterisk (e.g. to 9999) be included in a future update? It is difficult to get SPSS and Excel to recognize the asterisk.
However, when I checked the exported data file, I found two problems: 1) the id variable is composed of 7-digit numbers, and should look like 1311110, 6522222, and so forth. But in many cases these values were truncated and looked like 131, 652, ..
2) When I read the data file in Stata, I found all the variables were not aligned with the respective columns. For instance, case#1 of the id variable lies rightly in the first column, but case#2 of id falls in the second column, and #3 in the third column..
I tried to save the model without controlling complex survey effects. It turned out a success. But I do wish to save the data with the survey effects. Could you help to figure out where the problem is?
I am using the Add Health data for a LCA, and the ID number appears to be too long (8 digits). I need to keep the ID number in the data set so I can merge the C variable with the original data set for analysis. If I divide the ID number by 100, Mplus can use it, but the numbers are no longer unique, and the merge doesn't work properly. Do you know a workaround for this?
When I transfer my data from Stata to MPlus using the "stata2plus" command my id variable, which was originally 8 digits long, somehow is getting converted to a different number. E.g. the first record is now getting a '1" for the id variable instead of the eight digit code it had before. This is especially problematic when trying to merge the class variable and c-probabilities back in with the original dataset. Why would the value of the id variable change? Is there any way to fix this or syntax to use to ensure the original values are retained? Thank you!
I am having a similar problem, though my error number is 29 but I cant find any documentation that tells me what the #29 means
this is my code:
TITLE: this is an example of a LCA with continuous latent class indicators using automatic starting values with random starts DATA: FILE IS qs_lpa.csv; VARIABLE: NAMES ARE id seek lr avd sens; USEVARIABLES ARE id seek lr avd sens; IDVARIABLE IS id; MISSING = all(-99); CLASSES = c (4); ANALYSIS: TYPE = MIXTURE; OUTPUT: tech1 tech8 tech11 tech14 CINTERVAL; SAVEDATA: File is "C:/R/o.csv"; SAVE = CPROB;
This is my output *** WARNING in SAVEDATA command (Err#: 29) Error opening data save file: C:/R/o.csv Data will not be saved.
I have rights to the folder location and the path is correct. Interestingly, when I change the direction of the slash from / to \ I get error #9 but still doesnt save the data and error message otherwise is the same