Skip to content
Prev 16882 / 20628 Next

feedback: Anova (type III-tests) table based on LRT for glmmTMB models (drop1, anova, mixed)

Hi Guillaume,

Thanks for your feedback. Indeed, the initial version could not handle 
fancy formulas. I have just updated the package on github to allow this 
and also ensured it works with glmmTMB:

library("monet")
library("glmmTMB")
## adapted from the vignette:
set_sum_contrasts()
Owls <- transform(Owls,
 ????????????????? Nest=reorder(Nest,NegPerChick),
 ????????????????? NCalls=SiblingNegotiation,
 ????????????????? FT=FoodTreatment)
zipp_test <- test_terms(formula = NCalls~(FT+scale(ArrivalTime))*SexParent +
 ????????????????????????? offset(log(BroodSize)),
 ??????????????????????? data = Owls, extra_formula = ~ (1|Nest),
 ??????????????????????? est_fun = glmmTMB,
 ??????????????????????? arg_est = list(ziformula=~1, family=poisson)
)
zipp_test
# glmmTMB Anova Table (Type III tests)
#
# Model: NCalls ~ (FT + scale(ArrivalTime)) * SexParent + 
offset(log(BroodSize)) +
# Model:???? (1 | Nest)
# Data: Owls
#???????????????????????? Effect Df 1 Df 0???? Chisq Pr(>Chisq)
# 1?????????????????????????? FT??? 8??? 1 20.03 ***???? <.0001
# 2?????????? scale(ArrivalTime)??? 8??? 1 58.62 ***???? <.0001
# 3??????????????????? SexParent??? 8??? 1????? 0.00?????? >.99
# 4???????????????? FT:SexParent??? 8??? 1????? 0.00?????? >.99
# 5 scale(ArrivalTime):SexParent??? 8??? 1????? 0.00?????? >.99
# ---
# Signif. codes:? 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?+? 0.1 ? ? 1

If you have some example data, where the LRT fails, I could take a look 
at it as well. Ideally, I would then add this as a test to the package. 
So preferably with some data that is available in some package or so. 
However, if this is not possible, I could also only run the tests only 
locally and keep your data private. In this case, send me the data offlist.

Cheers,
Henrik



Am 09.08.2018 um 10:20 schrieb Guillaume Adeux: