|
|
Error: Variable [...] removed from us... |
|
Message/Author |
|
|
Hello, I am trying to run a mixture modeling with known classes and I ended up getting this error message: *** WARNING in Variable command Variable DISAB, used in KNOWNCLASS specification, has been removed from the USEVARIABLES list. Subsequent errors may occur if this variable is used elsewhere. *** ERROR in Variable command Unknown variable in CATEGORICAL option: disab This happened after I had several (correctable) mistakes in my input file (forgotten semicolons and such). It might help to mention that the data is pretty big (over 20,000 cases), and the group variable (disab) splits the sample in a unbalanced manner (~18,000 and ~ 2,000). A second question related to the previous, if I get the model to work, it is my guess that I should worry about this unbalanced distribution in the "disab" (stands for disability, yes/no) variable - is that right? What would you suggest me to do? Thank you. Cris Dogaru |
|
|
The CATEGORICAL list is for dependent variables only. I think the 2000-18000 split should be okay. |
|
|
Thank you for the answer, indeed the categorical list is for dependent only, and it seems that the variable determining the KNOWNCLASS (disab in my case) should not be placed under USEVARIABLES either. However, it still doesn't work; I make a mistake somewhere and I don't know where. Weight=bypw0; Cluster=schoolid; Usevariables=picall piopen pipta piadvis piptcon pievent pivolun pifund; Categorical=picall piopen pipta piadvis piptcon pievent pivolun pifund; Classes=pi(3) pid(2); Knownclass=pid (disab=0 disab=1); Analysis: Type = mixture complex ; Model: %overall% pi on pid; Model pi: %pi#1% [picall piopen pipta piadvis piptcon pievent pivolun pifund]; %pi#2% [picall piopen pipta piadvis piptcon pievent pivolun pifund]; %pi#3% [picall piopen pipta piadvis piptcon pievent pivolun pifund]; Model pid: %pid#1% picall piopen pipta piadvis piptcon pievent pivolun pifund; %pid#2% picall piopen pipta piadvis piptcon pievent pivolun pifund; *** ERROR in Model command Invalid ON statement: PI#1 ON PID#1 The order of categorical latent variables does not allow for this regression. |
|
|
Change the CLASSES option as follows: CLASSES = pid(2) pi(3); |
|
|
This is strange... If I have the knownclass variable (disab) listed under "usevariables" (were it shoud be, according to the example at page 166 of Mplus5 User Guide), I get: *** WARNING in Variable command Variable DISAB, used in KNOWNCLASS specification, has been removed from the USEVARIABLES list. Subsequent errors may occur if this variable is used elsewhere. *** ERROR Training variable has missing value at observation 118. If I take it out, I get: *** ERROR Training variable has missing value at observation 118. (with the input as in the previous post) |
|
|
Your Knownclass variable has missing data - that's not allowed (it is not a Known variable then). |
|
|
Thanks. I got it to work using USEOBSERVATIONS= disab NE -9999; What put me off was the reference to "training variable" |
|
Back to top |
|
|