Skip to content

Help establishing mixed model equation for split, plot design

3 messages · Samuel Knapp, Paul Johnson, CALLEJA APESTEGUI, FELIPE FRANCISCO

#
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:

  
  
#
Hi,
Other designs are possible, e.g. fitting crossed random effects in lme is possible but fiddly. Pinheiro & Bates (Mixed Effects Models in S and S-Plus, 2000, p163-167) show how to do this using pdBlocked.

Best wishes,
Paul
#
Thanks everyone.


Samuel, indeed I was refering to missing observations, and due to the lmer considering automatically I won't worry about it.


Thanks Samuel and Paul for the links. I think I'll stay with the lmer model but in case of needing to use the lme I'll check them for help.


Best regards to everyone, you have been of great help.


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