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)
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
Thanks Jil. The model runs for ever and not converge.
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
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.
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
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.