I have a Randomized Complete Block design with 2 factors, replicated over 4 blocks and repeated over 4 years. Each block has 9 plots and each plot is divided into 2 subplots. The main-plot factor has 9 levels (randomized to each of the 9 plots) and the split-plot factor has 2 levels (randomized to each of the 2 subplots). Within a block, the 9 levels of the main-plot effect moved around every year, i.e., level 1 may be in plot 1 in year 1, but in plot 3 in year 2, and so on; the split-plot effect was randomized once in year 1 and does not move between subplots throughout the years. The response is Simpson's diversity index. There are 283 observations (72 obs/year x 4 years - 5 missing). I think my experiment is somewhat similar to the nlme::Oats
in which Variety
is the main-plot effect and nitro
split.
I fitted a lmer
model as follow, the df
came out correct but some random factors' variance components are zeros, so I am trying a lme
for richer options of variance-covariance structure lme and lmer comparison.
With lmer
, the model would be:
lmer(Respond ~ Main * Split + (1|Year) + (1|Block) + (1|Year:Block) + (1|Year:Main) + (1|Year:Split) + (1|Year:Main:Split) + (1|Block:Year:Main), Data)
My lme
model below did not produce the same ANOVA table as the lmer
's.
lme(Respond ~ Main * Split, random=list(Block = pdBlocked(list(~1, ~Main - 1, ~Split - 1))), Data, weights = varIdent(form = ~ Block|Year))
My computer crashes on glmmPQL
, which is better at handling non-normal response https://rpubs.com/bbolker/3336
glmmPQL(Respond ~ Main * Split + (1|Year) + (1|Block) + (1|Year:Block) + (1|Year:Main) + (1|Year:Split) + (1|Year:Main:Split) + (1|Block:Year:Main), Data, family = "Gamma")
I adapted random=list(Block = pdBlocked(list(~1, ~Main - 1, ~Split - 1)))
from page 165 in Pinhero and Bates https://link.springer.com/book/10.1007/b98882 and might be similar to this problem Repeated measures ANOVA with lme/lmer in R for two within-subject factors
with weights = varIdent(form = ~ Block|Year))
, I wanted to cover the movement of main-plot factors within each block every year.
On a side note, I am aware that "If a variance component is zero, dropping it from the model will have no effect on any of the estimated quantities (although it will affect the AIC, as the variance parameter is counted even though it has no effect). Pasch, Bolker, and Phelps (2013) gives one example where random effects were dropped because the variance components were consistently estimated as zero. Conversely, if one chooses for philosophical grounds to retain these parameters, it won’t change any of the answers." (from https://bbolker.github.io/mixedmodels-misc/glmmFAQ.html#lme). I notice that removing the zero variance components changed the denominator degree of freedoms, F-ratios, but does not change the significance of the treatment factors in the ANOVA table, which does not change my answers so far. However, I am concerned about the significance of the contrasts as I move on to further explain my results.
So, I was looking for a way to "translate" the lmer
model into lme
that respects unbounded variance components. Thanks a lot for any leads.