BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
L_L
Calcite | Level 5 L_L
Calcite | Level 5

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

1 ACCEPTED SOLUTION

Accepted Solutions
L_L
Calcite | Level 5 L_L
Calcite | Level 5

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

View solution in original post

5 REPLIES 5
SteveDenham
Jade | Level 19

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

L_L
Calcite | Level 5 L_L
Calcite | Level 5

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

lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

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.

L_L
Calcite | Level 5 L_L
Calcite | Level 5

Many thanks

SteveDenham
Jade | Level 19

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 5 replies
  • 2623 views
  • 6 likes
  • 3 in conversation