[R-sig-ME] Help establishing mixed model equation for split plot design
CALLEJA APESTEGUI, FELIPE FRANCISCO
felipe-francisco.calleja at alumnos.unican.es
Tue Apr 3 09:53:15 CEST 2018
Hello,
I'm looking for some help establishing a mixed model ANOVA using R, for a split plot design I've made for an experiment of saltmarsh germination. I'll explain as clear as possible the experimental design and afterwards what I've done and my doubts. Hope you can help me. I haven't worked very much with R so many of my doubts are about what I'm "telling" it to do with one or other command.
The experiment consists in meassuring the germination percentage of one species in variable conditions of salinity, immersion time and presence of other species. I sow seeds in soil core's, that are inside plastic boxes that are filled periodically with saline water. There are three factors: salinity (3 levels: 0, 5 and 18), immersion time (3 levels: 0, 20, 40%), species treatment (2 levels: Baccharis, Baccharis + Juncus). Inside each box there are 6 cores that combine in a complete random design the factors of immersion and species treatment. The box is filled with water at one of the levels of salinity. Thus, I'm using a split plot design with salinity as the whole plot factor, and immersion and species treatment as the subplot factors. All factors are considered fixed. Each box is repeated 5 times. Thus, there are 15 boxes and 90 soil cores. The dependent variable is the percentage of germination of the species Baccharis in each core.
I have several doubts about how to analyze the array.
1 - As far as I understand, although I'm treating all my factors as fixed, this is a mixed model because of the interaction between subjects (the boxes I believe), and the "split plot nature" of the array, right? In that sense, which function would be better to analyze this, the aov of the stats package, the lme of the nlme package, the lmer of lme4?
2 - I've had trouble calculating the degrees of freedom for the residuals. The only reference I have is that the error of the whole plot part should have 12 df's, and the within error should have 60 df's. With that reference I've established two possible R commands:
fit.aov2 <- aov(Plantsurvival ~ salinityF*immersionF*SpecTF + Error(rep:salinityF/immersionF:SpecTF), data=sp.datos)
With rep being the number of repetition. This last one gives the 12 and 60 df's for the error terms.
The other option is:
fit.okay <- lme(Plantsurvival ~ salinityF*immersionF*SpecTF, random= ~1|rep/salinityF, data=sp.datos)
But in this last case, the df's are 8 and 60, which makes me suspect maybe there is something wrong. But as I said, I haven't cleared my head on which should be the correct df's.
Questions: Is the aov line solving a mixed model adequate for my design?,
Is the lme line considering salinityF as a random factor? If it is, how can I tell it to consider all factors as fixed, but put salinity at the "higher level" of the whole plot and the other ones in the "lower level" of the subplot?
I hope the questions and the experimental array are clear. If there is any doubt or need more information please let me know. I attach a csv file with the data in case you want to see it.
Finally, if is not too much to ask, I'm fairly new to the splitplot anova's and R, so I would really appreciate if you could answer be with as much detail as possible, to fully understand what's going on and where to continue.
Thanks a lot,
Felipe Calleja Apéstegui
Predoctoral researcher
Instituto de Hidráulica Ambiental "IH Cantabria"
C/ Isabel Torres, Nº 15
Parque Científico y Tecnológico de Cantabria
39011 Santander (España)
www.ihcantabria.es<http://www.ihcantabria.es/>
Tel: +34 942 20 16 16 Ext. 1153
Fax: +34 942 26 63 61
e-mail: felipe-francisco.calleja at alumnos.unican.es
More information about the R-sig-mixed-models
mailing list