Announcement

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

  • Question about mixed-effects models after linear interpolation of longitudinal data

    Dear all,
    I would appreciate your advice regarding the appropriate analysis of a longitudinal dataset in Stata.

    I have a cohort of 221 patients with repeated DXA Z-score measurements obtained at irregular follow-up times, resulting in 2,373 observed Z-score measurements. To standardize follow-up at annual intervals (as required for a publication), I linearly interpolated Z-scores between consecutive observed measurements, producing an anniversary-year dataset with 4,498 observations from 197 patients. Patients with only one observed measurement could not be interpolated and were therefore excluded from the anniversary-year dataset.

    I am fitting the following mixed-effects model:

    mixed z_score c.anniv_year##(i.z_sitespine1hip2radius3 i.gender1female i.splenectomy1yes i.n370s_homozygous1yes i.eversmoked i.typetype11type30 c.interval_symptom_tx c.zimran_score c.ert_date1 c.ageatthestartoftreatment c.anniv_bmi c.vitamind_anniv ib2.erttype1alglucerase2velagluceras c.ukg i.bisphosphonatesanniv_year0no1yes) || subject_id: c.anniv_year, covariance(unstructured) reml dfmethod(kroger)

    My question concerns statistical inference. Since many of the Z-scores were created by deterministic linear interpolation rather than being directly observed, I am concerned that treating all anniversary-year observations as regular measurements may underestimate uncertainty.

    I initially wondered whether mi estimate should be used, but I understand that mi estimate is intended for multiple imputation rather than deterministic interpolation

    Could you please advise:
    1. Is there any recommended way in Stata to account for the additional uncertainty introduced by deterministic linear interpolation when fitting a mixed-effects model?
    2. Is using reml dfmethod(kroger) considered sufficient for this setting, or is there another recommended approach?
    3. Should I I fit the mixed model using only the original observed measurements and compare it with the interpolated mixed model?
    Any guidance or references to recommended practice would be greatly appreciated.

    Thank you very much for your time and assistance

    Best,
    Oana

  • #2
    Your first question hits at the major weakness of linear interpolation, in my opinion. By constructing the interpolated score as you do, you assume perfect linearity, which is unverifiable and unrelaxable in the model. If the true trajectory is nonlinear between observation points, you will never be able to appropriately recover that. However, if this is the convention in your field (you note that it is required for publication), then you must do it but you should state it as a severe limitation of the approach.

    As to your second question, I typically would not use dfmethod(kroger) with this many subjects. The Kenward-Roger correction of the standard error estimates is most useful when you have very few subjects and thus more uncertainty is warranted. A nice paper on this method was written in 2017 by McNeish.

    For the third question, I would say that you absolutely should fit the model to the raw data. Stata's mixed command has the option to specify different types of residual covariance structures to account for non-constant within-person correlation for unknown reasons. If you wanted to estimate individual time trajectories as in your current model, the marginal covariance structure is determined by the covariance between the random slope and intercept (note that it would be this simple given models with identical random intercept and slope variances; in practice the random intercept and slope variances play a part as well). However, Stata allows you to specify an exponential autoregressive covariance structure that accommodates irregularly spaced measurement occasions. This induces subject-specific covariance structures that are dependent on each subjects spacing of occasions. The structure is autoregressive because it imposes that the correlation between time points decreases as time moves on. This is usually a reasonable assumption.

    The residuals() option is what you would use to allow for an exponential covariance structure:
    Code:
    * Model that accounts for exponential covariance structure but no random intercept (constant mean differences over time in persons)
    mixed outcome occasion || subject_id: , noconstant residuals(exponential, t(occasion))
    eststo exp_only
    
    * Model that assumes a linear mean trajectory that adequately describes change for all individuals but individual specific intercept variance
    mixed outcome occasion || subject_id: , residuals(exponential, t(occasion))
    estimates store ri_exp
    
    * Test whether there is additional heterogeneity that is explained by between-person mean differences 
    lrtest ri_exp exp_only, stats
    
    * Model that assumes a linear mean trajectory that also allows for individual variation in the linear time slope
    mixed outcome occasion || subject_id: occasion, cov(un) residuals(exponential, t(occasion))
    estimates store growth_curve_exp
    
    * Test whether growth curve model fits the data better than random-intercept model, given both have exponential residual covariance structures
    lrtest growth curve_exp ri_exp, stats
    If you are interested in digging into these types of models more, I would strongly encourage you to check out Lesa Hoffman's Longitudinal Analysis book.
    Last edited by Erik Ruzek; 04 Aug 2026, 12:02.

    Comment

    Working...
    X