09-13-2013 12:09 AM
I am trying to analyze a longitudinal data with binary response using 3-level logistic regression. Hierarchical structure of my data looks like this- each subject is remeasured 4-7 times (level-1) and there are 10K subjects (level-2) in total. About 40-60 subjects are nested within each of 190 clusters (level-3). The response is mortality (y=1 if dead and y=0 if not dead). There are 6 predictor variables say, x1, x2,… , x6. Variable Remeas = 1, 2, …., 7 is remeasurement indicator; ID=1, 2, …., 60 is subject ID and Clus= 1, 2, …., 190 is cluster ID. I thought it could be analyzed using PROC NLMIXED or PROC GLIMMIX but I am not sure how to do it for 3-level model. Can anyone please tell me if I have correct SAS codes below for performing 3-level mixed effects logistic regression?
proc glimmix data= mydada method=quad;
class meas ID clus;
model y (event=’1’) = x1-x7 / dis=bin link=logit ;
random intercept/ subject=Clus;
random intercept/ subject=Clus(ID) type=un;
output out=glimmixout pred(blup ilink)=predprob