Count outcomes with non-integers PreviousNext
Mplus Discussion > Structural Equation Modeling >
Message/Author
 Jennifer Yahner posted on Tuesday, September 28, 2010 - 10:25 am
Hi,

I'm trying to estimate a negative binomial model where my count variable has non-integers in it (0.3, 0.7, etc), but I keep getting the error below:

There is at least one observation in the data set where a count variable has negative or non-integer value. Please check your data and format statement.

Is this estimation not possible?

-Jennifer
 Linda K. Muthen posted on Tuesday, September 28, 2010 - 11:47 am
Count variables are integer values starting at zero.
 Markus Martini posted on Monday, August 12, 2013 - 7:36 am
I´m trying to estimate a linear growth model for errors in a learning task. Errors are count variables, right?. When I try to estimate the model I get the warning: There is at least one observation in the data set where a count variable has negative or non-integer value. Please check your data and format statement.
When checking my datas I find no negative or non-integer values (range 0 - 0.24). Missings are defined (-999). Is there something I fail to notice?
Thank you very much!
 Linda K. Muthen posted on Monday, August 12, 2013 - 9:48 am
You may have blanks in your data set and are reading it as free format causing the data reading to be off. Blanks are not allowed with free format data. Or you may have more names on the NAMES list than columns in your data set also causing the data to be read incorrectly. If you can't figure this out, please send the files and your license number to support@statmodel.com.
 B posted on Friday, August 01, 2014 - 5:29 am
RE: The above error

When you say you are reading in blanks I'm assuming that this is over an above the set missing command? If so, how would I rectify this if reading in a .dat file? I don't find much about the Format command.

I tried to crack this issue for a while yesterday. I'm using MplusAutomation through R to prepare data for Mplus. I figured something strange might be going on in the back end, since I think I've seen people have this issue with STATA. Nothing seemed to work. File looks fine.

*** ERROR
There is at least one observation in the data set where a count variable
has negative or non-integer value. Please check your data and format statement.
 Linda K. Muthen posted on Friday, August 01, 2014 - 5:38 am
Please send the relevant files and your license number to support@statmodel.com.
 Katherine Winham posted on Monday, August 25, 2014 - 3:08 pm
Hi,

I am experiencing the same error.

All of the data values are integers and non-negative. I believe the issue is reading the file into Mplus (I tried in both .dat or .csv formats).

There may be an issue with spacing, and I am unsure how to correct.
 Linda K. Muthen posted on Monday, August 25, 2014 - 3:35 pm
Please send the output and data along with your license number to support@statmodel.com.
 Anthony O'Sickey posted on Wednesday, February 08, 2017 - 9:30 am
Hello,
I am experiencing the same issue as those above. I have specified my dependent as a count variable with poisson distribution. Data is all intergers, missing are specified as 999, and there are no blanks in the file. I've checked my names list and saved the file under both .dat and .csv. No luck. Any help would be appreciated.
Thank you,

A.J.
 Bengt O. Muthen posted on Wednesday, February 08, 2017 - 2:35 pm
It is easy for us to see your error if you please send the output and data along with your license number to support@statmodel.com.
 Anthony O'Sickey posted on Thursday, February 09, 2017 - 3:29 pm
Hi Dr. Muthen,

Thank you for your reply. I was able to figure out the problem. I thought I was truncating the variables in the display option within SPSS and did not know that this did not truncate the number displayed in the cell so despite checking my spss file, my .csv still contained non-integers (hence the warning). Thank you again for your reply.

A.J.
 Bengt O. Muthen posted on Thursday, February 09, 2017 - 4:03 pm
Ok.
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: