1

I've fit a mixed linear model to some longitudinal data. I'm interested in the differences in patterns of decrease in the dependent variable according to group status, and my hypothesis particularly predicts a difference between the groups in trajectory of change at between specific ages. The data shows a significant interaction between group and the linear and quadratic effects of age, but I don't know if there is a way to assess this interaction for one part of the age range, or if I need to be able to do so in order to interpret my results as bing supportive of my hypothesis.

NB I'm using the nlme package in R

gung - Reinstate Monica
  • 132,789
  • 81
  • 357
  • 650
Angela
  • 11
  • 1

2 Answers2

1

What you need to do is fit a new model with spline terms added to specify the different ranges of $age$ that your theory addresses. I talk about these issues here. Specific to your situation, let's imagine that you have 2 groups, and you think the relationship between $age$ and the response variable will be the same between 0 and 20, but will differ between 20 and 30, and then be the same again afterwards. Then you would have a model with, among other covariates, $group$, $age$, $age_{spline20}$, $age_{spline30}$, and all the associated interactions. Here is how you would create those spline terms: $$ \begin{aligned} age_{spline20} &= 0 &\text{if } age\le{20} \\ age_{spline20} &= age-20 &\text{if } age>20 \\ \\ age_{spline30} &= 0 &\text{if } age\le{30} \\ age_{spline30} &= age-30 &\text{if } age>30 \end{aligned} $$
You can also form squared (quadratic) versions of these if you want them. The key to whether the slopes differ between the groups will be the tests of the interactions between these terms and the groups. For example, given the story above, you would expect no interaction between $age$ and $group$, but that there would be an interaction between $age_{spline20}$ and $group$. (Note that, in this complicated scenario, if the slope after 30 was the same between the groups, the $age_{spline30}*group$ interaction would also have to exist to compensate.)

gung - Reinstate Monica
  • 132,789
  • 81
  • 357
  • 650
0

You can assess the interaction for one part of the age range by getting predicted values for people at different ages and groups, and seeing how the differences differ. This may support (or not support) your hypothesis, but it doesn't yield a p value and so on.

You could plot the effect of age for the different groups, and see how the interaction looks at different ages. Again, no p value.

I, for one, am not a big fan of p-values, but you may need them. One way to do this would be to add a marker variable for being in the age range or not in the age range, and then add a three-way interaction between age, group and the marker variable.

Peter Flom
  • 94,055
  • 35
  • 143
  • 276