[R-sig-ME] Anova (type III-tests) table based on LRT for glmmTMB models

Ben Bolker bbolker @ending from gm@il@com
Mon Jul 30 23:40:23 CEST 2018


car::Anova only does Wald tests.

I don't know whether drop1() works, although if not it would be worth
seeing what it would take to make it work.

"Type 3" ANOVA is tricky in R, even with drop1() constructs, because
it sometimes requires constructing model matrices that R won't easily
provide.  For example: if A and B are both factors, then ~A:B as
constructed by model.matrix() will still include the main effects.
The only way I know of to do it is to use ~1+A+B+A:B (or equivalently
~A*B) and then drop or zero-out the unwanted columns of the model
matrix.

afex::mixed has some nice type-3 constructs, I don't remember exactly
how they work.

On Mon, Jul 30, 2018 at 5:05 AM Mollie Brooks <mollieebrooks using gmail.com> wrote:
>
> Hi Guillaume,
>
> I’m not very experienced with Anova, but I know the development version of glmmTMB supports car::Anova. Ben recently added this functionality.
>
> To install the development version try devtools::install_github("glmmTMB/glmmTMB/glmmTMB")
> or see further instructions here https://github.com/glmmTMB/glmmTMB
>
> After installing, check out vignette("model_evaluation")
>
> cheers,
> Mollie
>
> > On 30Jul 2018, at 10:59, Guillaume Adeux <guillaumesimon.a2 using gmail.com> wrote:
> >
> > Hello everyone,
> >
> > I'm looking for a method/function in order to produce an Anova table based
> > on Likelihood Ratio Tests (LRT) for a glmmTMB model (R software). In my
> > case it is with a beta distribution and log link. My response is a ratio
> > (%) in a repeated measures design.
> >
> >   -
> >
> >   the function Anova() from the {car} package doesn't not run on single
> >   models (i.e. Anova(mod)). It only allows comparison of two models (i.e.
> >   Anova(mod,mod1)).
> >   -
> >
> >   for glmer models, I was used to using the mixed() function from the
> >   {afex} packages which produced Anova tables (type III tests) based on LRT
> >   (or parametric bootstrap) for glmms.
> >
> > Could anyone shed their on light on a function like mixed() which would run
> > on glmmTMB objects or on a procedure to do this by hand?
> >
> > I suppose if only one fixed predictor was present in the model, this would
> > be simple by comparing it to a null model but my model contains an
> > interaction. Hence, I am incable of comparing a model A+B+B:C with a model
> > containing A+B:C.
> >
> > Thanks for your interest.
> >
> > Guillaume ADEUX
> >
> >       [[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]]
>
> _______________________________________________
> R-sig-mixed-models using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models



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