+ Reply to Thread
Results 1 to 9 of 9

Thread: Multilevel Structure & Random Effects

  1. #1
    Points: 20,006, Level: 89
    Level completed: 32%, Points required for next Level: 344

    Posts
    568
    Thanks
    50
    Thanked 20 Times in 19 Posts

    Multilevel Structure & Random Effects




    Hi!

    We have the following data structure and I'm wanting to get some feedback on how to correctly specify a multilevel model for research.

    Patients (i), Care-Givers (j), Hospital (k)

    Our structure is such that:
    Patients (i) are nested within Hospitals (k). Care-Givers (j) can also work at several different Hospitals (k).


    Our outcome is a single binary (yes/no) variable and we're interested in including patient level covariates, as well as some hospital level (size, # of beds) and care-giver characteristics (sex, specialty).

    Our ultimate goal is to tease apart the variation in the outcome and attribute it to Care-Givers and Hospital.

    I believe I am using a cross-over structure. Does anyone have any pointers to get started in SAS?

    Cheers,

  2. #2
    Omega Contributor
    Points: 38,423, Level: 100
    Level completed: 0%, Points required for next Level: 0
    hlsmith's Avatar
    Location
    Not Ames, IA
    Posts
    7,005
    Thanks
    398
    Thanked 1,186 Times in 1,147 Posts

    Re: Multilevel Structure & Random Effects

    I think you may go the route of Proc glimmix. Seems like you may have 3 levels, not sure how you get that third one into SAS, two variables listed in strata?
    Stop cowardice, ban guns!

  3. The Following User Says Thank You to hlsmith For This Useful Post:

    jamesmartinn (08-07-2014)

  4. #3
    Cookie Scientist
    Points: 13,431, Level: 75
    Level completed: 46%, Points required for next Level: 219
    Jake's Avatar
    Location
    Austin, TX
    Posts
    1,293
    Thanks
    66
    Thanked 584 Times in 438 Posts

    Re: Multilevel Structure & Random Effects

    You only have 1 observation per patient, right? So really we can only estimate 2 random effects (hospitals and caregivers), not 3.

    The GLIMMIX syntax might look something like this:
    Code: 
    proc glimmix;
    model y = patientCov1 patientCov2 size beds sex specialty / dist = binary solution;
    random intercept patientCov1 patientCov2 sex specialty / sub=k type=un;
    random intercept patientCov1 patientCov2 size beds / sub=j type=un;
    run;
    “In God we trust. All others must bring data.”
    ~W. Edwards Deming

  5. The Following User Says Thank You to Jake For This Useful Post:

    jamesmartinn (08-07-2014)

  6. #4
    Omega Contributor
    Points: 38,423, Level: 100
    Level completed: 0%, Points required for next Level: 0
    hlsmith's Avatar
    Location
    Not Ames, IA
    Posts
    7,005
    Thanks
    398
    Thanked 1,186 Times in 1,147 Posts

    Re: Multilevel Structure & Random Effects

    Thanks Jake, that is what I meant.
    Stop cowardice, ban guns!

  7. The Following User Says Thank You to hlsmith For This Useful Post:

    jamesmartinn (08-07-2014)

  8. #5
    Points: 20,006, Level: 89
    Level completed: 32%, Points required for next Level: 344

    Posts
    568
    Thanks
    50
    Thanked 20 Times in 19 Posts

    Re: Multilevel Structure & Random Effects

    Thank you for the quick responses! <3


    Can you kindly explain the logic behind having the patient level characteristics on the random intercept lines? Also, some of the physician factors (sex) are fixed, so this part is throwing me off too.

  9. #6
    Cookie Scientist
    Points: 13,431, Level: 75
    Level completed: 46%, Points required for next Level: 219
    Jake's Avatar
    Location
    Austin, TX
    Posts
    1,293
    Thanks
    66
    Thanked 584 Times in 438 Posts

    Re: Multilevel Structure & Random Effects

    That syntax specifies random slopes. The caregiver covariates are fixed for a caregiver, so those can't be random across caregivers, but they can be random across hospitals, because a hospital is observed with multiple caregivers and thus multiple values of the caregiver covariates. Likewise for the hospital covariates, if caregivers are observed with multiple hospitals then we can estimate random slopes across caregivers for the hospital covariates. And the patient-level covariates vary at the observation level so random slopes for those can be estimated across both grouping factors.

    Edit: I see that I accidentally switched around the "j" and "k" grouping factors in my syntax. Will fix now.
    “In God we trust. All others must bring data.”
    ~W. Edwards Deming

  10. The Following User Says Thank You to Jake For This Useful Post:

    jamesmartinn (08-07-2014)

  11. #7
    Points: 20,006, Level: 89
    Level completed: 32%, Points required for next Level: 344

    Posts
    568
    Thanks
    50
    Thanked 20 Times in 19 Posts

    Re: Multilevel Structure & Random Effects

    Quote Originally Posted by Jake View Post
    That syntax specifies random slopes. The caregiver covariates are fixed for a caregiver, so those can't be random across caregivers, but they can be random across hospitals, because a hospital is observed with multiple caregivers and thus multiple values of the caregiver covariates. Likewise for the hospital covariates, if caregivers are observed with multiple hospitals then we can estimate random slopes across caregivers for the hospital covariates. And the patient-level covariates vary at the observation level so random slopes for those can be estimated across both grouping factors.

    Edit: I see that I accidentally switched around the "j" and "k" grouping factors in my syntax. Will fix now.
    Thanks for the clarification Jake - makes sense! And thanks to everyone else too for such quick responses <3, appreciate it

  12. #8
    Points: 20,006, Level: 89
    Level completed: 32%, Points required for next Level: 344

    Posts
    568
    Thanks
    50
    Thanked 20 Times in 19 Posts

    Re: Multilevel Structure & Random Effects

    If I'm interested in calculating the ICC from this model, my guess is it would be something like this:

    ICC for Care-giver = variance of care-giver random effect / variance of care-giver random effect + variance of hospital random effect + level 1 variance in responses (persons).

    Likewise, I can switch around if I wanted the ICC for hospital. My question comes from specificying the level 1 variance in responses. Can I take it to just be Pi^2/3? This is what I've seen done, however after reading some more if seems that this is only appropriate if you consider the latent variable approach to logistic regression. Is it much different than what we've done in GLIMMIX? Can I use the output from GLIMMIX and just substitute in Pi^/3 or do I have a bit of work cut out for me using NLMIXED and/or possibly other tools? Any advice would be helpful!



    Cheers,

  13. #9
    Cookie Scientist
    Points: 13,431, Level: 75
    Level completed: 46%, Points required for next Level: 219
    Jake's Avatar
    Location
    Austin, TX
    Posts
    1,293
    Thanks
    66
    Thanked 584 Times in 438 Posts

    Re: Multilevel Structure & Random Effects


    I would not encourage you to calculate ICC for a model that includes random slopes. The well-known ICC formulas only apply to models that have random intercepts only. There are lesser-known formulas that can be used to calculate ICCs for models with random slopes, but they are not very useful, because with random slopes the ICC is a function of the predictors--that is, there is not one ICC, but many ICCs, one for each unique value of the predictors. These issues are discussed in further detail by Goldstein et al. here:
    http://www.bris.ac.uk/cmm/research/pvmm.pdf
    See also slides 28-32 here:
    http://www.bristol.ac.uk/cmm/softwar...dom-slopes.pdf
    Of course these resources are talking about normal models, not logistic models, but the same issues should apply I would think. Just say no to ICC in random slopes models.
    “In God we trust. All others must bring data.”
    ~W. Edwards Deming

+ Reply to Thread

           




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts






Advertise on Talk Stats