[RsigME] Anova (type IIItests) table based on LRT for glmmTMB models
Sorkin, John
j@orkin @ending from @om@um@ryl@nd@edu
Tue Jul 31 03:46:24 CEST 2018
A model that contains an interaction without the main effects that are included in the interaction is unusual. Before I would run, or publish, such a model, I would think long and hard.
John
John David Sorkin M.D., Ph.D.
Professor of Medicine
Chief, Biostatistics and Informatics
University of Maryland School of Medicine Division of Gerontology and Geriatric Medicine
Baltimore VA Medical Center
10 North Greene Street
GRECC (BT/18/GR)
Baltimore, MD 212011524
(Phone) 4106057119
(Fax) 4106057913 (Please call phone number above prior to faxing)
________________________________
From: Rsigmixedmodels <rsigmixedmodelsbounces using rproject.org> on behalf of John Maindonald <john.maindonald using anu.edu.au>
Sent: Monday, July 30, 2018 6:44 PM
To: Ben Bolker
Cc: R SIG Mixed Models
Subject: Re: [RsigME] Anova (type IIItests) table based on LRT for glmmTMB models
CAUTION: This message originated from a non UMB, UMSOM, FPI, or UMMS email system. Whether the sender is known or not known, hover over any links before clicking and use caution opening attachments.
On Type III tests, I note that pp.2426 of the document give a comprehensive
account.
afex::introductionmixedmodels<http://127.0.0.1:11966/help/library/afex/doc/introductionmixedmodels.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 multilevel 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 pvalues in the model that remains, with the extent of the change cumulating
as more terms are omitted. The result may readily be that pvalues 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 zeroout the unwanted columns of the model
matrix.
afex::mixed has some nice type3 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]]
_______________________________________________
Rsigmixedmodels using rproject.org<mailto:Rsigmixedmodels using rproject.org> mailing list
https://stat.ethz.ch/mailman/listinfo/rsigmixedmodels
[[alternative HTML version deleted]]
_______________________________________________
Rsigmixedmodels using rproject.org<mailto:Rsigmixedmodels using rproject.org> mailing list
https://stat.ethz.ch/mailman/listinfo/rsigmixedmodels
_______________________________________________
Rsigmixedmodels using rproject.org<mailto:Rsigmixedmodels using rproject.org> mailing list
https://stat.ethz.ch/mailman/listinfo/rsigmixedmodels
[[alternative HTML version deleted]]
_______________________________________________
Rsigmixedmodels using rproject.org mailing list
https://stat.ethz.ch/mailman/listinfo/rsigmixedmodels
[[alternative HTML version deleted]]
More information about the Rsigmixedmodels
mailing list