BookmarkSubscribeRSS Feed
L_L
Calcite | Level 5 L_L
Calcite | Level 5

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 ;

run;

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

1 REPLY 1
lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

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.

http://www2.sas.com/proceedings/sugi30/196-30.pdf

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

What is ANOVA?

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.

Discussion stats
  • 1 reply
  • 4627 views
  • 3 likes
  • 2 in conversation