2
$\begingroup$

I am unsure how to best control for baseline levels in a mixed effects models. I've seen several different suggestions and I'm not sure if one option or more correct or appropriate than another.

Lets say I am running analysis for longitudinal study with 3 treatment groups (group 1, group 2, group 3) and three time points (baseline, time 2, time 3) and I want to know how these variables impact our outcome variable Y. Lets say the dataset is configured in the long format like this.

id   treatment_group time  y
1001               1    1  5
1001               1    2  5
1001               1    3  5
1002               2    1  6
1002               2    2  7
1002               2    3  8
1003               3    1  4
1003               3    2  5
1003               3    3  6

If we wanted to know the effect of treatment group, time, and treatment by time, then we could run the following mixed effects model, however I'm unsure if said model adequately accounts for baseline levels. Based upon the following post, it sounds like this would control for baseline levels due to the fact that the model is a mixed effects model.
Baseline adjustment in mixed models with two assessments

Y = treatment_group + time + treatment*time

I've seen some posts which suggest that we should add a covariate for the baseline level of Y. Some posts also recommend adding a baseline_y by time interaction. Baseline adjustment in mixed models

Y = treatment_group + time + treatment*time + baseline_y
Y = treatment_group + time + treatment*time + baseline_y + baseline_y*time

I've seen another series of posts that recommend changing the dataset and removing the baseline timepoint. From here, we could run a mixed effects model.
Including a baseline covariate in a linear mixed-effects model

id   treatment_group time  y baseline_y
1001               1    2  5          5
1001               1    3  5          5
1002               2    2  7          6
1002               2    3  8          6
1003               3    2  5          4
1003               3    3  6          4

 Y = treatment_group + time + treatment*time + baseline_y

Including a baseline covariate in a linear mixed-effects model

I've seen numerous different posts on this issue and wanted to see if there was any consensus.

$\endgroup$
0

1 Answer 1

2
$\begingroup$

The details depend on the specifics of study design, so I can't say that there is a "consensus" applying to all circumstances. There are some principles, however, that apply to the specific study design that you show. I'll assume that the outcome variable is continuous, although your example only shows a limited set of integer values.

First, if your study is on how treatments affect some outcome, it doesn't make much logical sense to include a pre-treatment baseline value as an "outcome" observation. If you do that, what you are mainly doing is evaluating the differences in baseline (pre-treatment) values among treatment groups.

You should do that evaluation for quality control, but including it in the model of treatment effects per se makes the statistical design and interpretation of the model more complex. When pre- and post-treatment outcomes are clearly delineated, you typically control for pre-treatment baseline levels by including them as covariates associated with the "outcomes" observed post treatment.

Second, you need to include some function of time as a predictor in a longitudinal model, as your proposed models do. If you use the pre-treatment value as a covariate and there are only two post-treatment observations for each individual, the function of time is just a simple binary indicator of whether the observation is the first or the second after treatment. That's a big simplification for this specific design.

Third, all your proposed models include an interaction between time and treatment, which allows for different associations of time with outcome depending on the treatment received. That makes sense, and leads to the last model proposed in the question: only time2 and time3 observations treated as outcomes, baseline_y as a covariate, and a treatment by time interaction.

Fourth, there are several possible deficiencies in that last model. You might need to include additional terms.

For example, that model assumes a strictly linear association between baseline_y and subsequent outcomes. That might not be adequate; a more flexible fit to baseline_y (e.g., via a regression spline) might be necessary.

Furthermore, if you don't include an interaction of baseline_y with time you are assuming that the association of baseline_y with post-treatment outcome is independent of time. (You do specify that interaction in one of your earlier proposed models.) If you don't include an interaction of baseline_y with treatment, you are assuming that the association of baseline_y with post-treatment outcome is independent of treatment. If you don't allow for a 3-way interaction among treatment, time, and baseline_y, you are assuming that the joint association of baseline_y and time with post-treatment outcome is independent of treatment.

Are any of those reasonable assumptions? You have to apply your understanding of the subject matter during initial study design to make that choice, as each additional interaction included in the model requires more participants.

Finally, things are more complicated if the outcomes aren't continuous or if there are more than 2 post-treatment observations. I'd recommend Chapter 7 of Frank Harrell's Regression Modeling Strategies as a place to start. It goes into those additional complications, presents the relative advantages of several types of longitudinal data analysis in a simple table (mixed models aren't always the best choice), and provides an extended example that applies the principles to a data set.

$\endgroup$
2
  • $\begingroup$ I wish I could upvote that answer 3 times @EdM. I’m glad you hit on possible nonlinearity of the baseline effect, which is another reason to very seldom treat the time zero measurement as an outcome in the longitudinal model. I have seen strong nonlinear effects in two patient oriented outcome studies because patients with really bad baseline levels could have major benefits of a therapy. And regarding the lack of fit of mixed models see this. $\endgroup$ Commented Nov 24, 2023 at 16:31
  • 1
    $\begingroup$ @FrankHarrell thanks. I spend much of my time on this site pointing people to your RMS resources, which contain the answers to so many questions that I see (like this one). $\endgroup$
    – EdM
    Commented Nov 24, 2023 at 16:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.