[R-sig-ME] test_terms for lme model with crossed random effects and weights

Guillaume Adeux guill@ume@imon@@2 @ending from gm@il@com
Tue Oct 23 12:06:07 CEST 2018

Hi everyone,

I wanted to allow for different variances across treatment levels so I
headed towards nlme:lme in order to use varIdent().

However, I also have crossed random effects (year and plot) which needs a
little hack in nlme:lme to specify.

Hence the final model is:

dat$Grp=1 ### fake grouping in order to create grouped data object
gr=groupedData(response~time|Grp,data=dat) ### grouped data object
mod4 <- lme(response~ block+treatment*time, random =
pdBlocked(list(pdIdent(~ year - 1),pdIdent(~ plot -
1))),weights=varIdent(form=~1|treatment), data=gr,method="ML")

The question now is: is it possible to supply such a model to
monet::test_terms() ?
I cannot find such examples in

Thank you all once again for you help.


Guillaume ADEUX

Nb: if I understood correctly from previous messages, this type of model
(crossed random effects, specific variance structure) could also be fitted
with glmmTMB

	[[alternative HTML version deleted]]

More information about the R-sig-mixed-models mailing list