Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Predicting individual-level slopes and intercepts after running mixed-effects models

    Hi All

    I'm running two linear spline mixed-effects models (growth curve analysis) looking at mental health and BMI development over time (models include 4 splines for 4 time periods):

    for mental health:
    Code:
     
     eststo: mi estimate, post: mixed mh age10_16 age16_23 age23_33 age33_42 || id: agec, cov(unstr) mle stddev
    for BMI:
    Code:
     
     eststo: mi estimate, post: mixed bmi age10_16 age16_23 age23_33 age33_42 || id: agec, cov(unstr) mle stddev
    The above models run well.

    I would now like to predict the individual-level intercepts and slopes for mental health & BMI generated by the above two models as I plan to run further linear regressions between them.

    So, I would have mental heath slope and intercepts variables and BMI slope and intercepts variables (generated from the spline models above) to run a regular linear regression like:

    regress bmislope mentalhealthslope bmi-intercept mh-intercept

    Running, for mental health:
    Code:
     
     predict mh
    only gives me the average slopes for the four splines (i.e. all individuals have the same set of four slopes) and not the individual level slopes that I would like to have. I would I obtain these?

    Thanks!
    /Amal

  • #2
    Following -mixed-, -predict- has an -reffects- option that will get you the random intercepts and slopes. -help mixed postestimation- and click the -predict- link for more information.

    Comment


    • #3
      Hi Clyde

      Thanks - this is my mixed effects model:

      Code:
      eststo: mi estimate, post: mixed bmi age10_16 age16_23 age23_33 age33_42 || id: agec, cov(unstr) mle stddev
      I then tried:

      Code:
      predict bmifull, fitted relevel(id)
      and:

      predict bmifull, reffects relevel(id)

      and:

      predict u1 u0, reffects reses(s1 s0)

      but in all cases, I get error msgs:

      option fitted not allowed or
      option reffects not allowed

      Am I misspecified something?

      Thanks
      /Amal

      Comment


      • #4
        Oh, I overlooked the fact that you are using multiple-imputation. -predict- is very restricted after multiple imputation. I'm sorry, I don't know how to get the random component estimates in this situation. If somebody else does, I hope he or she will chime in.

        Comment

        Working...
        X