Message/Author 

Daniel posted on Wednesday, March 23, 2005  12:19 pm



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=smoker9smoker12 u9u12 y9y12; categorical are smoker9smoker12; 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 


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  1:54 pm



Yes, . is missing in my data set. Do I need to recode my missing value. I'm not sure what you mean by _missing. 


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  2:39 pm



Linda, I'm still getting the same error messages. Here is my code for 9th grade, twopart growth model, and the resulting error message. !missing are .; idvariable is id; usevariables=smoker9smoker12 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  4:10 pm



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  5:02 pm



All messages sent to the email address support@statmodel.com are being kicked back as not deliverable. 

bmuthen posted on Wednesday, March 23, 2005  5:10 pm



Not to worry  your message will be read. 

Back to top 