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=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  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. 


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, 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  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. 

MPI posted on Monday, April 11, 2016  1:34 am



Hi Linda and Bengt, I am trying to fit a twopart growth curve model using repeated measure data from 20 time points. The dependent variable has a lot of zeros and missing values due to mortality during followup. As the missing due to mortality is likely to be missing not at random, I would like to combine the twopart model with the nonignorable models. So far I fitted the data by twopart model (MAR) and twopart patternmixture model. When fitting the Diggle & Kenward’s twopart growth model, the computation is extremely slow (in fact, it is still running for days). The sample I am running is only 10% of our original sample (around 15,000 out of 150,000). I think the extremely slow computing is related to the fact that I have too many dropout indicators (19 in total) in the model. If possible, is there a way to speed up the computation? Or there may be something wrong in my model, for example, trying to combine twopart model with the selection model? Many thanks in advance. 


Check how many dimensions of integration you have (top of TECH8 screen output). If more than 34 you should switch to Montecarlo integration using fewer points. For instance, 4 dimensions gives 15*15*15*15 = 50625 points using regular integration. Here you can instead use Montecarlo integration with 5000 points. Also, start with a smaller sample  perhaps 5% instead of 10. 

MPI posted on Wednesday, April 13, 2016  6:07 am



Many thanks for your suggestions! I just have a followingup question that, in the MNAR models, should I model the dropout/survival indicators in both the Ypart and Upart of the twopart model? In my case, theoretically the survival is related to both U and Ypart. 


I don't think so. Dropout is the same for Y and U. 

Back to top 