Dear all
I'm using this code
(1)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've a client request to run the same model without intercept.
How can I do it? I would like a model with no intercept but with the random effect of hosp variable.
I tried with
(2) PROC GLIMMIX DATA=input plots= all;
class hosp mese;
model y= x_1 x_2 x_3 mese /dist=poisson link=log s noint;
output out=gmxout predicted=pred resid=res;
random intercept /subject=hosp ;
run;
but I think the option noint and statement
random intercept /subject=hosp ;
could be in contrast (however model (1) and (2) give the same output)
I tried also with this code but I'm not sure that the model is what I want.
(3) PROC GLIMMIX DATA=input plots= all;
class hosp mese;
model y= x_1 x_2 x_3 mese /dist=poisson link=log s noint;
output out=gmxout predicted=pred resid=res;
random _residual_ /subject=hosp ;
run;
Thank in advance for any help
Kind Regards
Many thanks Steve for your help.
And what about model in the third code?
(3) PROC GLIMMIX DATA=input plots= all;
class hosp mese;
model y= x_1 x_2 x_3 mese /dist=poisson link=log s noint;
output out=gmxout predicted=pred resid=res;
random _residual_ /subject=hosp ;
run;
What kind of model I'm running?
Thanks in advance
Have a nice time
I am somewhat surprised by the request to remove "intercept" but still have the random effect of "hosp." So far as I have ever been able to tell, the following RANDOM statements are equivalent:
RANDOM intercept/subject=hosp;
RANDOM hosp;
The only advantage is that the first is somewhat more stable algorithmically, and is absolutely needed in PROC GLIMMIX for METHOD= LAPLACE or METHOD=QUAD.
I would ask client some questions regarding why they want to fit things differently, and in particular, do they wish to change the inference space to the narrower space of only those hosp observed?
Steve Denham
Many thanks Steve for your help.
And what about model in the third code?
(3) PROC GLIMMIX DATA=input plots= all;
class hosp mese;
model y= x_1 x_2 x_3 mese /dist=poisson link=log s noint;
output out=gmxout predicted=pred resid=res;
random _residual_ /subject=hosp ;
run;
What kind of model I'm running?
Thanks in advance
Have a nice time
Your model 2 is the one to use, if you really do not want a fixed effects intercept. As stated by Steve, there are multiple equivalent ways of writing out the random effect terms using GLIMMIX or MIXED. Model 3 is different. You are basically fitting a marginal effects model with overdispersion, not a conditional effects model (as in model 2). That is, fitting model 3 adjusts the standard errors in a multiplicative sense for variability greater than expected for a Poisson distribution.
Many thanks
That is a repeated measures model of sorts. I would expect it to differ slightly, as the denominator degrees of freedom may change to reflect the clustering in the subject factor. Looking at some data I had on hand, the repeated measures approach looked way underdispersed overdispersed (as per lvm's note above) and had a substantially larger -2 Res , Log Pseudo-Likelihood. That indicates to me that the model with RANDOM intercept/subject=animal (NB. for MY data) is a better model.
Steve Denham
Message was edited by: Steve Denham
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.