Reads data incorrectly PreviousNext
Mplus Discussion > Structural Equation Modeling >
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?
 Linda K. Muthen posted on Saturday, July 05, 2003 - 9:02 am
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
 Linda K. Muthen posted on Monday, February 16, 2004 - 12:52 pm
In Version 2.14, a variable listed on the CATEGORICAL statement cannot be a new variable created in DEFINE. See pages 55-56 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!
 Linda K. Muthen posted on Tuesday, July 08, 2008 - 2:03 pm
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.
 Nikolaos Stavrakakis posted on Thursday, August 12, 2010 - 1:52 am
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
 Linda K. Muthen posted on Thursday, August 12, 2010 - 9:27 am
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.
 Denise Aske posted on Tuesday, May 27, 2014 - 10:49 am
Hello Linda,

I keep receiving the error: Unrecognized symbol in data file: symbol at record #: 1, field #: 4
Field 4 is the same as fields 1-3, which are numbers in the general format. I'm not sure why I am receiving this message.
 Linda K. Muthen posted on Tuesday, May 27, 2014 - 11:59 am
Please send the output, data set, and your license number to support@statmodel.com.
 Maria Kleinert posted on Wednesday, October 01, 2014 - 7:48 am
Dear Linda,

I have the Problem that I'm reading in a data file from SPSS and it turns out that MPLUS mixed up all values for only ONE variable (The values are within the variable range, but are mixed up, so all subjects have incorrect values) Strangely, the rest of the data was read in correctly.Everything else seems fine.

We really don't know what could have happened or how to fix this Problem.

Kind regards,

Maria Kleinert
 Linda K. Muthen posted on Wednesday, October 01, 2014 - 8:34 am
Please send the data, output, and your license number to support@statmodel.com.
 Anshuman Sharma posted on Thursday, May 24, 2018 - 12:20 am
Dear Dr Muthen,

I am running a SEM model. Following is the code:
VARIABLE: NAMES ARE y1-y49 Acc1 Acc2 Sp S Th;
USEVARIABLES Acc1 Th;
MODEL:
Acc1 on Th;
OUTPUT: SAMPSTAT TECH1 TECH4 STDYX;

Note that Ys are the responses to the items of a construct and their values vary from 1-4. Rest of the variables are continuous variables.
The problem is that the regression results of Acc1 on Th are wrong.

However, when I change the data file (exclude Ys) and keep only variables Acc1 and Th, then the regression model results are correct.

I think the problem is related to the way data is read.

Could you please suggest a solution.

Thanks and regards,
Anshuman
 Bengt O. Muthen posted on Thursday, May 24, 2018 - 3:47 pm
Perhaps you don't have 54 columns in your data to match the 54 variable names in your NAMES statement.

If that doesn't help, send your output and data to Support along with your license number.
 Anshuman Sharma posted on Thursday, May 24, 2018 - 4:40 pm
Thank you Dr Muthen for the response. Yes, there is a problem in the data file.

Regards,
Anshuman
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: