Programming the statistical procedures from SAS

proc glimmix: residual

Contributor L_L
Posts: 56

proc glimmix: residual

Dear all

I'm using this SAS code:

PROC GLIMMIX DATA=input plots= all;

      class hosp mese;

model y=  x_1 x_2 x_3  mese /dist=poisson link=log s ;

      output out=gmxout predicted=pred resid=res;

     random intercept /subject=hosp ;


I need some explanation about the predicted value and the  residual I find in the   output  file: how is calculated the predicted value (it's a value too far from observed value and in contrast with residual) ? And about residual, what kind of residual is calculated?

Thanks in andvance for any help

Kind regards

Valued Guide
Valued Guide
Posts: 679

proc glimmix: residual

You are getting the default choices for predicted values and residuals. These are considered conditional values (conditional on the random effects). Thus, you are getting the predicted value (predicted linear predictor) for {x1,x2,x3} for each hosp value in the data set. These are considered BLUPs (actually, EBLUPs). Even if the independent variables were the same, the predicted value would be different for two different hosp values. The residual is just the difference with the observed (calculated on the link scale). If you want the so-called marginal predictions (i.e., at the expected value of 0 for the random hosp effect), use:

     output out=gmxout2 pred(noblup)=pred residual(noblup)=residual;

Check out the following for more guidance, or the User's Guide.

Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation