BookmarkSubscribeRSS Feed
BayzidurRahman
Obsidian | Level 7

Hi,
I have data from Stepped wedge cluster RCT with 2 level clustering. The outcome is error rate per patients (number of error/total number of orders). Patients are clustered withing wards and measurements are clustered within patients. one patient can readmit into different wards during the study period which makes the patient level random effects cross-classified. With the following variables, can anyone suggest me the correct model specification with cross-random effects?

ward: unique ward id (level 3)
mrn: unique patient id (levl 2)
error: total number of error (level 1)
totalorder: total number of orders (the offset)
int: intervention (binary variable)

5 REPLIES 5
jiltao
SAS Super FREQ

crossed random effects are specified like something like the following--

random int / subject=ward;
random int / subject=mrn;

(if data allows, sometimes you might also add random int / subject=ward*mrn; but my experience indicates that this random effect is often not supported adequately by data).

Hope this helps,

Jill

BayzidurRahman
Obsidian | Level 7

Thanks Jil. The model runs for ever and not converge.

jiltao
SAS Super FREQ

Crossed random effects models are known to be resource intensive. I am not surprised that it took a very long time.

Can you send in your program? Also how many levels in Ward and how many levels in MRN?

Thanks,

Jill

BayzidurRahman
Obsidian | Level 7
proc glimmix data=tre;
class l2 id period;
model count=period knt1-knt3 / dist=poisson link=log offset=offset;
random intercept / subject=l2;
random intercept / subject=id;
run; 

I have also attached a sample of my dataset.

jiltao
SAS Super FREQ

For the long run time issue, you might try the following approach to see if it helps:

proc sort data=tre;
by id;
run;
proc glimmix data=tre; class l2 period; model count=period knt1-knt3 / dist=poisson link=log offset=offset; random intercept / subject=l2; random intercept / subject=id; run;

For the convergence issue, you might want to double check your offset variable -- it should be the log of the measure of exposure. 

Jill

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 636 views
  • 1 like
  • 2 in conversation