I am using a mixed model repeated measures analysis and have a few questions in terms of how to structure the model.
My setup is 24 individual plots, grouped into 6 blocks. There are 4 treatments in 2 levels: i.e. 2 different treatment types, 4 treatments in total: No treatment, treatment 1, treatment 2, interaction between treatment 1 and 2. Each treatment is replicated once per block, i.e. 6 times in total.
Measurements are repeated over time. I.e. the same plot is repeatedly measured at different time points. All plots are measured once for each time point. The time intervals between each measurement campaign (time point) are not equal (i.e. could vary from a few days to several weeks), which needs to be accounted for in the analysis, if possible. Most likely, the variances are also not equal for each measurement campaign.
I would put Block
as a random factor, but it could also be added as a fixed effect.
So to sum up:
Dependent variable - y
Fixed effects - Treatments T1
and T2
, separately and interaction
Random effect - Block
(could also be fixed?)
Subject - PlotID
, individual plots (which are repeated through time)
Repeated measures - Time
point (given as day-of-year)
I tried the following syntax for mixed model repeated measures in R (lme4
package, lmerTest
for p-values):
a. lmer(y ~ T1 * T2 * Time + (1|Block), data=dataset)
But I understand there are other ways as well:
b. lmer(y ~ T1 * T2 * Time + (1+Time|Block), data=dataset)
c. lmer(y ~ T1 * T2 * Time + (1|Block/Time), data=dataset)
d. lmer(y ~ T1 * T2 * Time + (1|Block:Time), data=dataset)
e. lmer(y ~ T1 * T2 * Time + (1+Block|PlotID), data=dataset)
Here are my questions:
Which model would be most correct in my case? What are the differences between them? I should note that when I ran models b-e, my model did not always converge. What would be the reason for this?
Is this the correct way of doing repeated measures - to simply include
Time
as a fixed factor? Or is there another way of structuring this type of analysis?Should
Time
(day-of-year) be classified as factor, numeric or integer?Should I specify
PlotID
anywhere (as in e)? I need the model to recognise that I have 24 individual plots repeated over time. At the same time, I want to correct for the noise arising from the differences between blocks. Each combination of treatment and block is unique (i.e. 24 in total).What covariance structure does R use? How are the degrees of freedom calculated?
I previously set up the analysis in SAS Enterprise. Here, I ran into the problem that I got no significant results at all, even though it looks like there should at least be some significance according to my graphs. Also, I get completely different results in R and SAS. What is the reason for this?
(1 | Block / Plot)
. If you includeTime
as numeric in your fixed effect, you model a linear trend. That might or might be not appropriate. Including time as a factor variable is a practice I would avoid, although it might work well if you have very few time points. Otherwise, you'll quickly overparameterize your model. A GAMM might be a better option (see package mgcv). ... $\endgroup$