Hello everyone,
I am applying PROC GLIMMIX on a dataset with binary response. I am getting a NOTE in the log file which is:
NOTE: Some observations are not used in the analysis because of: missing subject effects (n=2), not a proportion (n=142).
In the output page I get either "Does not converge" or "Estimated G matrix is not positive definite." I'm thinking that I have these problems since more than half of observations are deleted as the LOG file says (total sample size is 214). I've been digging the whole internet, but no one talked about this NOTE! I was wondering if anyone can help me over here.
my cods are:
proc glimmix data = colaps ;
class id;
model knowledge1_23 = prepost / s dist = binomial link = logit;
random int / subject = id ;
run;
The PROC is expecting 0 and 1 for the response variable (all the 2s are considered missing). In a data step, subtract 1 from all the values to get 0/1 variable. For the missing values, you must have a problem with two observations of ID.
What do you see if you run the following procedures?
proc means data=colaps N NMISS;
var id;
run;
proc freq data = colaps;
tables knowledge1_23;
run;
Hello Rick, Thanks.
These are the results:
n nmiss
214 0
knowledge1_23 frequency
1 72
2 142
The PROC is expecting 0 and 1 for the response variable (all the 2s are considered missing). In a data step, subtract 1 from all the values to get 0/1 variable. For the missing values, you must have a problem with two observations of ID.
Thanks to both of you.
That's correct! I had no idea that response should be 0s and 1s! Thanks.
Be aware that GLIMMIX supports a BINARY (=Bernoulli) distribution and a BINOMIAL distribution (for proportions),
You are using the binomial distribution, which requires 0/1.
If you meant to use a binary distribution, then '1' and '2' are perfectly OK, because any binary variable will work:
I see! Thanks for your helpful comments.
Apparently one of the subjects (with 2 repeated measurements) has missing values for some variable, but I'm
confused because in my version of SAS the NOTE in the log also says "missing fixed effects (n=2)" for that case. That's why I didn't ask about PREPOST. But maybe you have an earlier version of SAS in which the NOTE was different.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.