[R-sig-ME] Split plot repeated measurements + slope comparison
Nicolas Fanin
nicolas.fanin at hotmail.fr
Thu May 11 17:42:33 CEST 2017
Dear List,
I need your advices about data analysis (on which I working on since a long time), thank you for your responses.
I'm working on a split plot design with repeated measurements over time.
It consists of 3 Ecosystem types (large, medium and small), each ecosystem being repeated 10 times (30 ecosystems in total, each having an individual ID = EcosystemCode).
Within each ecosystem, we have 8 Treatments in which we measured plant biomass during 20 years.
I would like to know the effect of Ecosystem type, Treatments (and eventually Time).
If we consider that we measure the same plots over time (and the data are non-independant) each plot within each island being a distinct treatment (and are equivalent for the model):
modelfinal1 = lme (Biomass ~ EcosystemType*Tr, random = ~1|EcosystemCode/Plot, data = XXX)
And if I want to know the effect of Year:
modelfinal2 = lme (Biomass ~ EcosystemType*Year*Tr, random = ~1|EcosystemCode/Plot, data = XXX)
In the first model, I get a denDF of 27 for EcosystemType (that is ok given the 30 ecosystems) and denDF of 149 for Tr or the interaction between Tr x Ecosystem type
In the second model I get the same denDF for Ecosystem type and Tr, but I get a huge denDF of about 2992 for Time and the different interactions involving time.
What do you think about the degree of freedom? Do we overstate the degrees of freedom associated with the effect of Time? Do you know any multivariate approaches with fewer assumptions about variance/covariance structure that would be a better approach than the linear models? (the model are linear but sometimes vary towards log10-relationships)
Then, I tried to assess the differences between slopes representing the evolution of biomass over time in each of the 3 ecosystem types using mixed models (and contrast.matrix ):
modelfinal4 = lme (Biomass ~ EcosystemType*Year , random=~1|EcosystemCode, data = XXX)
contrast.matrix <- rbind(`Year:EcosystemTypelarge vs. Year:EcosystemTypemedium` = c(0, 0, 0, 0, 1, 0),
`Year:EcosystemTypelarge vs. Year:EcosystemTypesmall` = c(0, 0, 0, 0, 0, 1),
`Year:EcosystemTypemedium vs. Year:EcosystemTypesmall` = c(0, 0, 0, 0, -1, 1))
slopecomps <- glht(modelfinal4, contrast.matrix)
summary(slopecomps)
What do you think about this approach? Do you know any other (and may be more common) to compare slopes using mixed models?
Finally, I tried to get the R2mar and R2cond of the different using the paper of Nakagawa and Schielzeth 2013, for example:
mF= lmer (Totalbiomass ~ RealizedSR + (1|EcosystemCode), data = XXX)
anova(mF)
mFX <- model.matrix(mF)
Fixed <- fixef(mF)[2] * mFX[, 2]
VarF <- var(Fixed)
VarF <- var(as.vector(fixef(mF) %*% t(mFX)))
VarF/(VarF + VarCorr(mF)$Island[1] + attr(VarCorr(mF), "sc")^2)
(VarF + VarCorr(mF)$EcosystemCode[1])/(VarF + VarCorr(mF)$EcosystemCode[1] + (attr(VarCorr(mF), "sc")^2))
Do you know any package that can do te calculation directly for many variables at the same time?
Thank you for you responses once again, and I wish you a good week-end,
Best Regards,
Nicolas
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models
mailing list