BookmarkSubscribeRSS Feed
nataliavanessa0
Calcite | Level 5

Hello everyone:

 

I have a dataset with hierarchically clustered data: repeated measures per patient within repeated hospitals. I am trying to adjust for both levels in my model, plus I would like to estimate Relative Risks instead of odds ratios. I tried to use proc glimmix for my binary outcome, but the model doesn't run as either a binomial log or a poisson.  I get the following error: ERROR: Model is too large to be fit by PROC GLIMMIX in a reasonable amount of time on this system.
Consider changing your model.

 

Here is the code I am using:

proc glimmix data= data1;
class hospital gender outcome patient_ID;
model outcome= gender/dist=bin link=log s;
random hospital/ subject=patient_ID ;
run;

proc glimmix data= data1;
class hospital gender outcome patient_ID;
model outcome= gender/dist=poisson link=log OFFSET=followup;
random hospital/ subject=patient_ID ;
run;

 

 

thanks,

3 REPLIES 3
SteveDenham
Jade | Level 19

Some things that you might want to consider:

 

It is hard for me to understand how the same variable could be both binomially distributed and Poisson distributed, unless there is some aggregation in the Poisson distributed case.

I would expect that the level-1 variable, patient_id is not the subject for the level-2 variable hospital.  Try:

 

random intercept/subject=hospital;

Let the level-1 variable be "absorbed" by the distribution.

 

Unless outcome is multinomial, you don't need to include it in the CLASS statement.

 

These should lead to a reduction in model complexity that should allow GLIMMIX to proceed.

 

SteveDenham

StatsMan
SAS Super FREQ

For the binomial case, you will want to use LINK=LOGIT rather than LINK=LOG. 

 

Your RANDOM statement, random hospital / subject=patientid; , will attempt to correlate the observations from the same patient at the same hospital. You will need more than one observation for each patientid for this statement to be effective. If you want to correlate the observations from each hospital, then use the RANDOM statement that Steve suggested. 

 

If you want to further correlate observations from each patientid within a hospital, then add

random / subject=patientid(hospital);

How many levels of PATIENTID and HOSPITAL are in the data?

 

 

jiltao
SAS Super FREQ

So you have repeated measures for each patient, and patients are nested within hospitals? If so, you might want to use the following RANDOM statements in PROC GLIMMIX --

random int / subject=hospital;

random int / subject=patient_ID(hospital);

If the model is still too large, please let me know. There might be ways to make the model less resource intensive if needed.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 3 replies
  • 639 views
  • 0 likes
  • 4 in conversation