Variable with non-integer value PreviousNext
Mplus Discussion > Categorical Data Modeling >
 Jessica Leah posted on Thursday, August 05, 2010 - 5:42 pm

I'm trying to do a path analysis with a variable that has non-integer values. As a result, I'm getting an error message. Is it possible to correct this without modifying my variable?

 Linda K. Muthen posted on Friday, August 06, 2010 - 9:52 am
It sounds like you are putting the variable on the CATEGORICAL list. If it is categorical, it should not have non-integer values. Perhaps you are reading the data incorrectly.
 Melissa Kimber posted on Monday, February 13, 2012 - 9:02 am
I am getting a similar problem; however, I checked the data and everyone is coded as either a 1,2 or 3.
Any suggestions?
 Linda K. Muthen posted on Monday, February 13, 2012 - 9:57 am
Please send the input, data, output, and your license number to
 Lin Gu posted on Sunday, December 09, 2012 - 6:43 pm
I have a variable that has 7 ordered values: 0, .5, 1, 1.5, 2, 2.5, and 3. I put it one the categorical list and got the error message about non-integar values. Is there a way that I can treat the variable as a categorical variable or do I have to model it as a continuous variable? Thanks.
 Linda K. Muthen posted on Monday, December 10, 2012 - 10:50 am
The values of a categorical variable have no meaning. Just change the values to integers:

0 1 2 3 4 5 6
 Rohan Jayasuriya posted on Friday, October 30, 2015 - 8:08 am

I am having the same problem as Melissa Kimber

Categorical variable BPCNTR contains non-integer values

I have checked the input file on notepad and the variable is coded 1 or 2

I went back to my original SPSS file and saved it as dat file and tried again. same result.

any help appreciated
 Linda K. Muthen posted on Friday, October 30, 2015 - 9:00 am
Please send the output, data set, and your license number to You are most likely reading the data incorrectly or you have blanks in the data set.
 Aiden M A Thornton posted on Thursday, January 05, 2017 - 9:21 pm
Hello, I am also having the same problem as both Melissa and Rohan (above).

I'm trying to read in a categorical variable, and have checked that the values are integer in the .dat file but the output continues to state the following

"*** ERROR
Categorical variable SCT1OGIV contains non-integer values."

I have tried running this many times and continues to be a problem. Is there a way if / how I may be reading in the data incorrectly?

Many thanks.
 Linda K. Muthen posted on Friday, January 06, 2017 - 8:16 am
It is likely that you have blanks in the data set which cause free format data to be read incorrectly. If you can't figure this out, send the files and your license number to
 Martin Taylor posted on Sunday, June 11, 2017 - 3:01 pm
*** ERROR in VARIABLE command
Categorical variable U20 contains invalid and/or non-integer values.
Problem with: GPCM

I see this error trying to run an IRT model in mplus. I am employing the users guide example "5.5: Generalized partial credit model". I am copying/downloading the example input and data files as is. The file will run if I drop (gpcm) out of the command line in the example. But I am wanting to run the gpcm.
 Linda K. Muthen posted on Sunday, June 11, 2017 - 4:50 pm
Please send the files and your license number to
Back to top
Add Your Message Here
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Options: Enable HTML code in message
Automatically activate URLs in message