I cannot understand how to analyse a really simple randomised controlled trial in R.
I have two groups: Control and Intervention. Say there are 10 subjects in each group. These two groups are followed for 100 days, and X is measured every 10th day. I want to analyse if X response differently to time between the two groups. This is a very common design in medical science.
Lets for simplicity construct the following random intercept linear mixed model:
fit <- lme(X ~ Group * Time, random = ~ 1|ID, data)
The variable "Time" is categorical with levels: 1, 10, 20, 30, 40...100.
My question is: I am interested in the Group by Time interaction effects, between each category of Time, how can I get these results?
The main effects may be obtained like this:
library(car)
Anova(fit)
For the next step I want to compare the time response between the two groups between each category of time, i.e. Time*Group from day 0 to day 10, from day 10 to day 20 etc.
I know I can use Lsmeans, but I only get within group time responses. Thats not what I want, I want between groups time responses!