st: baseline adjustment in mixed models

 From Clyde Schechter To statalist@hsphsun2.harvard.edu Subject st: baseline adjustment in mixed models Date Sat, 14 Nov 2009 13:01:49 -0800

```I hesitate to disagree with Martin Buis, but perhaps I have interpreted

I suppose you have an outcome y observed on each participant at each time,
a variable group (coded 0 for control, 1 for intervention), a participant
identifier variable, id, and a variable, time, which might be actual times
of observation, or just a sequence 0 through N, whatever).  If your time
variable is not coded as baseline = 0, it will make life simpler if you
transform it so that is the case.

In the example below I will assume that you plan to model y as a linear
function of time, because that is the simplest from a coding perspective.
If you need a more complicated representation with dummies for different
times, or a spline, etc., you can modify accordingly.  Again, life is
simplest if the baseline measurement corresponds to time = 0 (or the
omitted time category if dummies are used) in your coding.

If you want to test whether the intervention has modified the response
trajectory over time, the key is to test for the group X time interaction.

gen groupXtime = group * time
xtmixed y group time groupXtime || id:

gives you a random intercept model.  The coefficient of group represents
the mean difference of y between intervention and control groups when time
= 0.  That is, this model does incorporate, and in a useful sense,
"adjusts for" the baseline difference between the groups.  The coefficient
of groupXtime represents the difference in the slopes of the y-time lines
between groups.

Now, you might want to make this more sophisticated if you anticipate that
individuals, within each group, might have different individual y-time
slopes, in which case a random slopes model might be better:

xtmixed y group time groupXtime || id: time

Again, baseline differences in y are satisfactorily accounted for in this
model, and are even directly estimated by the coefficient of group.
Again, the key inference is based on the coefficient of the interaction
term.

With either of these models you should get good, serviceable estimates of
the group difference in average y-time slope.  Note that this approach is
different from adjusting for baseline response by excluding the time 0
observations from the model and including time 0 response as a covariate
in an ANCOVA like analysis.

Hope this helps.

Clyde Schechter
Associate Professor of Family & Social Medicine
Albert Einstein College of Medicine, Bronx, NY, USA

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```