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

Maarten Jung M@@rten@Jung @ending from m@ilbox@tu-dre@den@de
Tue Oct 23 16:54:56 CEST 2018

I don't know if monet::test_terms() can do this.
But maybe the emmeans package can help here. The joint_tests() function
computes Type-III test for each effect in a model [1].
Also (what I find quite interesting), "[t]here is an experimental mode =
"satterthwaite" option that determines degrees of freedom approximately: It
estimates a needed gradient in the covariance matrix experimentally by
randomly perturbing the response values. Thus, the degrees of freedom will
vary slightly (or possibly even a lot) if the reference grid is
re-calculated" [2].

Cheers, Maarten

[2] https://cran.r-project.org/web/packages/emmeans/vignettes/models.html#K

On Tue, Oct 23, 2018 at 12:06 PM Guillaume Adeux <
guillaumesimon.a2 using gmail.com> wrote:

> 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
> https://rdrr.io/github/singmann/monet/src/examples/examples.test_terms.R
> Thank you all once again for you help.
> Sincerely,
> 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]]
> _______________________________________________
> R-sig-mixed-models using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

	[[alternative HTML version deleted]]

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