Model comparison for glmmTMB objects with beta family

1k views Asked by At

We are performing a beta mixed-effects regression analysis using glmmTMB package, as shown below:

mod = glmmTMB::glmmTMB(data = data,
                      formula = rating ~ par1 + par2 + par3 + 
                        (1|subject)+(1|item),
                      family  = glmmTMB::beta_family())

Next, we would like to run a model comparison — something similar to the ‘step’ function that is used for ‘lm’ objects. So far, we found the function ‘dredge’ from the MuMIn package which computes the fit of the nested models according to a criterion (e.g. BIC):

MuMIn::dredge(mod, rank = 'BIC', evaluate = T)

OUTPUT:
Model selection table 
  cnd((Int)) dsp((Int)) cnd(par1)  cnd(par2)  cnd(par3) df   logLik     BIC delta weight
2      1.341          +  -0.4466                        5 2648.524 -5258.3  0.00  0.950
6      1.341          +  -0.4466              0.03311   6 2648.913 -5251.3  6.97  0.029
4      1.341          +  -0.4468   -0.005058            6 2648.549 -5250.6  7.70  0.020
8      1.341          +  -0.4470   -0.011140  0.03798   7 2649.025 -5243.8 14.49  0.001
1      1.321          +                                 4 2604.469 -5177.9 80.36  0.000
5      1.321          +                       0.03116   5 2604.856 -5171.0 87.34  0.000
3      1.321          +            -0.001771            5 2604.473 -5170.2 88.10  0.000
7      1.321          +            -0.007266  0.03434   6 2604.909 -5163.3 94.98  0.000

However, we would like to know whether the difference in fit between these nested models is statistically significant. For lms with a normally distributed dependent variable, we would use anova, but here we are not sure if it is applicable to models with beta distribution or glmmTMB object.

1

There are 1 answers

2
Ben Bolker On

You could use the buildmer package to do stepwise regression with glmmTMB models (you should definitely read about critiques of stepwise regression as well). However, the short answer to your question is that the anova() method, which implements a likelihood ratio test, is implemented for pairwise comparison of glmmTMB fits of nested models, and the theory works just fine. Some of the more important assumptions are: (1) no model assumptions are violated [independence, choice of conditional distribution, linearity on the appropriate scale, normality of random effects, etc.]; (2) the models are nested, and are applied to the same data set; (3) the sample size is large enough that asymptotic methods are applicable.