Skip to content
Prev 16881 / 20628 Next

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

Hi Henrik,

Thank you very much for this work. This is highly appreciated. Here is some
feedback...

I did this on my data with the following code:

#set_sum_contrasts()
#test_terms(Ratio~block+year_s+syst+syst:year_s,extra_
formula=~(1|year:plot)+(1|plot)+(1|year),est_fun=glmmTMB::glmmTMB,data=bio)
Here is the output (year_s is scale(year)):

glmmTMB::glmmTMB Anova Table (Type III tests)

Model: Ratio2 ~ block + year_s + syst * year_s + (1 | year:plot) + (1 |
Model:     plot) + (1 | year)
Data: bio
       Effect Df 1 Df 0   Chisq Pr(>Chisq)
1       block   15    1      NA       <NA>
2      year_s   15    1    0.00        .99
3        syst   15    4 10.75 *        .03
4 year_s:syst   15    4    0.01       >.99
---
Signif. codes:  0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?+? 0.1 ? ? 1


-The function does not seem to recognize scale() when it is directly
applied in the formula (i.e. Ratio2~block+scale(year)+syst+syst:scale(year)).
The variable needs to be scaled outside of the formula. Otherwise, we get
an error message "Error in model.matrix.default(formula,data=new_data):
model frame and formula mismatch in model.matrix()". The same thing happens
if you want to add a small constant to the response (i.e. Ratio + 0.00001).
This needs to be done outside of the function.

-When a submodel has a convergence problem, the function is not capable of
doing the likelihood ratio test (cf. submodel in which "block" was
removed). This is not so surprising but it seems like like afex::mixed was
capable of doing so. I tried bumping up the number of iterations in arg_est
with arg_est=list(control=glmmTMBControl(...)) - which works - but did not
resolve the problem.

I can send you the data if you want to have a look see :) I'm afraid I
can't add much more.

Thanks again! You have a pending citation!

Guillaume ADEUX


2018-08-07 17:42 GMT+02:00 Henrik Singmann <singmann at psychologie.uzh.ch>: