I have an outcome variable y and person id id like following:
y id
-.2900997 19137
.2731551 19143
-.0283341 3.000e+09
.3288157 599
1.045171 2746
.4293538 2746
I am just running a simple command anova y id but get an error message: id: factor variables may not contain noninteger values.
However, the id variable is all integers. The only reason I can think of may be the scientific values such as 3.000e+09. So I change the format using format id %012.0f so they all look like integers now:
y id
-.2900997 000000019137
.2731551 000000019143
-.0283341 300000000005
.3288157 000000000599
1.045171 000000002746
.4293538 000000002746
However, when I run anova again, the same error occurs.
In addition, oneway y id works without any problem.
Does anyone know how to fix this? Thank you!!
egen newid = group(id), labeland use that variable. - Nick Cox