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

John Maindonald john@m@indon@ld @ending from @nu@edu@@u
Tue Jul 31 00:44:36 CEST 2018


On Type III tests, I note that pp.24-26 of the document give a comprehensive
account.
afex::introduction-mixed-models<http://127.0.0.1:11966/help/library/afex/doc/introduction-mixed-models.pdf>
NB that in suitably ‘balanced’ designs, type III sums of squares are not in
contention.

The complication is that a term A:B, when A and B do not appear in the model
formula, results in general in fitted values and in a contribution to the anova
sum of squares (this gets more complicated in multi-level models) that depend
on how A and B are parameterized (‘treatment’, or ‘sum’, or … contrasts).
One needs to think very carefully about the specific meaning that might attach
to any specific type 3 test and/or to the estimates that remain when lower order
terms are left out.  In models with several factors and/or covariates, the
complications of interpretation that result will often be just one more unhelpful
source of confusion.

Any model selection process changes the meaning that should be attached to
the p-values in the model that remains, with the extent of the change cumulating
as more terms are omitted.  The result may readily be that p-values that appear
‘highly significant’, in the model that results and with no account taken of
selection effects, should really suggest ‘not at all significant’.


John Maindonald             email: john.maindonald using anu.edu.au<mailto:john.maindonald using anu.edu.au>

On 31/07/2018, at 09:40, Ben Bolker <bbolker using gmail.com<mailto:bbolker using gmail.com>> wrote:

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<mailto: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<mailto: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<mailto: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<mailto:R-sig-mixed-models using r-project.org> mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

_______________________________________________
R-sig-mixed-models using r-project.org<mailto: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