Announcement

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

  • longitudinal mixed models

    Dear Stata users,

    I am working on repeated measure data of kidney markers and trying to construct a mixed model.
    In order to calculate eGFR decline, I would like to include age both as a linear and quadratic term and center for modeling, using random terms for intercept and age.

    I wonder if the model was constructed correctly.

    Code:
    sum current_age
    gen current_age_c=current_age - `r(mean) '
    
    mixed eGFR c.current_age_c i.other_variables || current_age: current_age_c,
    mixed eGFR c.current_age_c##c.current_age_c i.other_variables || current_age: current_age_c##current_age_c,
    Many thanks,

    Oyun

  • #2
    Not quite. I suppose that the repeated measures you have represent longitudinal data obtained from patients over time. So, hopefully, you have a patient id variable. Let's call that variable id. Then the model you want is
    Code:
    mixed eGFR c.current_age_c##c.current_age_c other variables || id: c.current_age_c##c.current_age_c

    Comment


    • #3
      As always, thanks very much, Clyde.

      Comment

      Working...
      X