Skip to content
Prev 16433 / 20628 Next

Help establishing mixed model equation for split, plot design

Hi Felipe,


please also respond to the mailing list.


Sorry, lme only takes nested random effects (see 
https://stats.stackexchange.com/questions/228800/crossed-vs-nested-random-effects-how-do-they-differ-and-how-are-they-specified). 
In order to use the rep:salinity effect, you could add a column for the 
main plots in your data set:


sp.datos$rep_salinityF <- paste(sp.datos$rep,sp.datos$salinityF,paste="_")

lmemodel <- lme(Plantsurvival ~ salinityF*immersionF*SpecTF, random= 
~1|rep_salinityF, data=sp.datos)


I hope, it works like this.


I'm afraid, I don't fully understand your question regarding equal 
number of samples. Do you mean missing observations? In lme, you need to 
add na.action="na.omit", while lmer is automatically omitting missing 
observations.

You're right, that the ANOVA is doing type III SS. If you're interested 
in other SS type, you could look at the Anova() function from the car 
package. Apparently it can also deal with mixed models. Furthermore, the 
new version of lmerTest can also handle other SS type. See 
https://github.com/runehaubo/lmerTestR/blob/master/pkg_notes/new_lmerTest.pdf


Best,

Samuel
On 04/04/18 10:15, CALLEJA APESTEGUI, FELIPE FRANCISCO wrote: