4
$\begingroup$

I have a repeated measures design where the main question is to test the differences between groups (3 levels) at specific time points.

The data is balanced with 8 subjects per group and 7 time points.

So far I have used a mixed model in R with the fixed effects Group*Time and random intercepts for the subjects. Then an ANOVA for this model to test the fixed effects. Also made planned mean comparisons to test the groups in some time points.

To the ANOVA, and the mean comparisons make sense I set Time as categorical. The problem is that the adjust is not so good, and I would like to model a curve through the time, so that I should treat Time as numeric.

My question is : Is it possible to make mean comparisons between groups at specific time points when Time is set as integer?

$\endgroup$

1 Answer 1

3
$\begingroup$

You can indeed compare the group at specific time points when time is treated as a continuous variable. In general, you can test the following hypothesis $$\begin{eqnarray} H_0: X_1 \beta = X_2 \beta\\ H_a: X_1 \beta \neq X_2 \beta \end{eqnarray}$$ where $\beta$ are the fixed effects of the model, and $X_1$ and $X_2$ are two design matrices specifying the means you want to test.

In R you could use the emmeans package to do this.

$\endgroup$
2
  • $\begingroup$ Just to add to the ‘emmeans` part, you may need to use the at argument to specify the desired time values; otherwise the average time is used. $\endgroup$
    – Russ Lenth
    Jan 6, 2020 at 21:44
  • $\begingroup$ Thanks so much for your answers, them have been very helpful. $\endgroup$ Jan 7, 2020 at 15:57

Your Answer

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

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