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?