Message/Author 

Anonymous posted on Saturday, June 28, 2003  9:34 pm



I am trying to fit a SEM model with a number of y categorical variables. In reading the data though it says "Categorical variable Y4 contains less than 2 categories" where as I can clearly see that the .txt file that I am supplying contains values 1, 2, 3, 4, and 5 (ordered categories). I tried creating that file on Excel and SPSS but still the message is the same. What might have gone wrong? 


With categorical outcomes, any observation with a missing value on one or more analysis variables is not included in the analysis (listwise deletion). I would imagine that this is what is happening. After listwise deletion, y4 contains only one category. If this is not the case, send the data and input and I will find the explanation. 

Anonymous posted on Monday, February 16, 2004  12:04 pm



Could you please see what I am doing wrong here (i am trying to create a categorical group variable)? thanks. INPUT INSTRUCTIONS DEFINE: if (gleason gt 6) then group5=1; if (gleason le 6) and (gleason>0) then group5=0; VARIABLE: NAMES ARE ID..oareax group4; CATEGORICAL is group5; MISSING ARE .; USEVARIABLES ARE age1x wst_hipx trigplx hdlx cpepx insulinx glucosex hgbx group5; ANALYSIS: type=meanstructure; MODEL: group5 ON age1x wst_hipx IR; IR ON age1x wst_hipx; IR BY trigplx* hdlx cpepx insulinx glucosex hgbx; IR@1; age1x WITH wst_hipx; OUTPUT: stand tech2; *** ERROR in Variable command Unknown variable(s) in CATEGORICAL option: group5 


In Version 2.14, a variable listed on the CATEGORICAL statement cannot be a new variable created in DEFINE. See pages 5556 of the Mplus User's Guide. Use the name from one of the other variables in the NAMES statement that is not on the USEV statement. That should work. This will be changed in Version 3. 

May Guo posted on Tuesday, July 08, 2008  1:33 pm



Hello I am tring to import data from SPSS to MPlus. I changed all the missing value to 9, saved the SPSS file to .dat format. When I check the .dat file with notepad, it seems that the data are read correctly. However after I imported data to MPlus and run the frequency, the means of any varaibles with missing values are different from what I get from SPSS. The difference is not due to decimal rounding (e.g. M=4.02 in SPSS vs. M = 4.33 in Mplus) I also tried to run CFA using Mplus, the model is not converged. But using exactly the same data to run CFA in AMOS, the model fit is reasonably good (CFI=.963, RMSEA=.064, NFI=.958). Can anyone suggest what might be the problem? Thanks! 


The default in Mplus is to use all available data (TYPE=MISSING). I believe the sample statistics in SPSS use the number of observations for each variable that are not missing. Different n's is the most likely reason for the discrepancy. The convergence problem may be due to large variances. See your sample statistics. If you have large variances, you can rescale the variances by dividing by a constant using the DEFINE command. We recommend keeping variances between one and ten. If this does not help, please send your input, data, output, and license number to support@statmodel.com. 


Hello Linda, I am trying to run the model fit for a SEM with 5 imputed datasets where I get this error message "Test of model fit, standard errors and sample statistics are not computed. This is due to zero successful imputations. chech tech 9" When I check tech9 for all imputed datasets this error message appears "The degrees of freedom for this model are negative. the model is not identified....check your model. The model estimation terminated normally. The standard errors of the model parameter estimates could not be computed....problem involving parameter 28...." Can you please explain what the problem is here? Is there something wrong with the imputed datasets (a quick inspection did not show anything there)? or is there not enough information in the data to estimate all of the parameters that i have specified? thanks for your time and efforts 


It sounds like the problem is with your model not the data. Please send the full output and your license number to support@statmodel.com. 

Back to top 