Two part growth model PreviousNext
Mplus Discussion > Missing Data Modeling >
Message/Author
 Daniel posted on Wednesday, March 23, 2005 - 6:19 am
Hi, I'm trying to run the following model, but I'm getting an error message that I do not understand. For sake of parsimony, I only present code for 9th grade. Can you please provide some assistance?

My code, excluding the data statement and list of variables.
missing is .;
idvariable is id;
usevariables=smoker9-smoker12
u9-u12 y9-y12;
categorical are smoker9-smoker12;
define:
u9=1;
if (smoker9 eq 0) then u9=0;
if (smoker9 eq .) then u9=.;
y9=smoker9;
if (smoker9 eq 0) then y9=.;
analysis: type=basic;

Error message

*** ERROR
(SMOKER9 EQ .)
^
ERROR
*** ERROR
.
^
ERROR
*** ERROR
.
^
ERROR
 Linda K. Muthen posted on Wednesday, March 23, 2005 - 6:59 am
IT looks like you have = . What do you mean by . That is not a valid statement except for the MISSING option. In the DEFINE command, use _MISSING to refer to a missing value.
 Daniel posted on Wednesday, March 23, 2005 - 7:54 am
Yes, . is missing in my data set. Do I need to recode my missing value. I'm not sure what you mean by _missing.
 Linda K. Muthen posted on Wednesday, March 23, 2005 - 8:22 am
No, you don't need to recode your missing vlaues. The _MISSING option is described in the Mplus User's Guide. Instead of

if (smoker9 eq .) then u9=.;

you would say

if (smoker9 eq .) then u9= _MISSING;
 Daniel posted on Wednesday, March 23, 2005 - 8:39 am
Linda, I'm still getting the same error messages. Here is my code for 9th grade, two-part growth model, and the resulting error message.

!missing are .;
idvariable is id;
usevariables=smoker9-smoker12
y9 y10 y11 y12 u9 u10 u11 u12;
define:
u9=1;
if (smoker9 eq 0) then u9 = 0;
if (smoker9 eq .) then u9= _MISSING;
y9=smoker9;
if (smoker9 eq 0) then y9 = _missing;

Error message received
*** ERROR
(SMOKER9 EQ .)
^
ERROR
*** ERROR
(SMOKER10 EQ .)
^
ERROR
*** ERROR
(SMOKER11 EQ .)
^
ERROR
*** ERROR
(SMOKER12 EQ .)
^
ERROR
*** ERROR
(SMOKER9 EQ .)
^
ERROR
*** ERROR
Missing matching right parenthesis.
*** ERROR
(SMOKER10 EQ .)
^
ERROR
*** ERROR
Missing matching right parenthesis.
*** ERROR
(SMOKER11 EQ .)
^
ERROR
*** ERROR
Missing matching right parenthesis.
*** ERROR
(SMOKER12 EQ .)
^
ERROR
*** ERROR
Missing matching right parenthesis.
*** ERROR
Invalid symbol in data file:
"." at record #: 30, field #: 23
 bmuthen posted on Wednesday, March 23, 2005 - 10:10 am
Instead of

if (smoker9 eq .) then u9= _MISSING;

Try

if (smoker9 eq _MISSING) then u9= _MISSING;

If that doesn't work, send your input, output, and data to support@statmodel.com, giving your license number.
 Daniel posted on Wednesday, March 23, 2005 - 11:02 am
All messages sent to the email address support@statmodel.com are being kicked back as not deliverable.
 bmuthen posted on Wednesday, March 23, 2005 - 11:10 am
Not to worry - your message will be read.
Back to top
Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: