BookmarkSubscribeRSS Feed
Longleaf
Calcite | Level 5

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

run;

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 Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 0 replies
  • 860 views
  • 0 likes
  • 1 in conversation