Prev: interpreting interaction term in survival model
Next: batch vs. interactive SAS -- generic critical errors
From: Jeremy Miles on 10 Dec 2009 13:43 Hello everyone, I'm calculating predicted probabilities for a logistic regression model in GLIMMIX, and there's something I don't understand (and can't work out). My predicted probabilities (based either on my calculation from the parameter estimates, or on saved predicted probabilities from glimmix) are all much too high (or too low). Here's a simple example to show what I mean. There are two variables - an id variable, and an outcome, which is dichotomous, 50% of scores are 0, 50% are 1. data test; input id outcome ; cards; 1 0 1 0 1 0 1 0 1 0 1 1 1 0 1 0 1 0 1 1 2 0 2 0 2 1 2 1 3 0 3 1 3 1 3 1 4 1 4 1 4 0 4 0 5 0 5 0 5 0 5 0 6 1 6 1 6 1 6 1 6 1 6 1 6 1 6 1 ; RUN; If I run an intercept only model with either proc logistic or proc glimmix, with no random effects, I get wha I expect, a parameter estimate of zero: proc logistic data=test; model outcome = /; run; Analysis of Maximum Likelihood Estimates Standard Wald Parameter DF Estimate Error Chi-Square Pr > ChiSq Intercept 1 0 0.3430 0.0000 1.0000 proc glimmix data=test method=quad; model outcome = / dist=binary solution; run; Parameter Estimates Standard Effect Estimate Error DF t Value Pr > |t| Intercept -205E-19 0.3430 33 -0.00 1.0000 proc glimmix data=test method=quad; class id; model outcome = /dist=binary solution ; random intercept / subject=id ; run; When I run it with the random effect, the parameter estimate isn't zero any more. Solutions for Fixed Effects Standard Effect Estimate Error DF t Value Pr > |t| Intercept -0.03590 0.8643 5 -0.04 0.9685 Can anyone explain what I'm missing here? Thanks, Jeremy -- Jeremy Miles Psychology Research Methods Wiki: www.researchmethodsinpsychology.com |