I have a nested repeated measures question. I have 20 individuals grouped into 5 families. For each individual I have measurements on subsequent days pre, during, and post-treatment for a total of 6 measurements per individual (on days 1 and 2 pre-treatment, on days 4 and 5 during treatment, and days 7 and 8 post-treatment).
I previously used a model with composited pre, during and post-treatment level that looked like this:
lme(log(X)~t1+t2, random=~1|family/participant, data=data)
t1 = -1 for pre-treatment and
t2 = 1 for post-treatment
This allowed me to interpret the slopes on
t2 to evaluate the treatment effect.
How do I incorporate the repeated measures within pre-treatment, during and post-treatment? Visualizing the data suggests correlation between these measurements on subsequent days and there may be a trend (slight up-tick).
Any suggestions on coding in R would be much appreciated!