Contents
Can you use dharma for GLMM residual checks?
This left me unable to recommend this as a general approach to folks I consult with. Since then, the author of the DHARMa package has come up with a clever way to use a simulation-based approach for residuals checks of GLMM’s. If you are interested in trying the package out, it has a very nice vignette to get you started.
Why does Dharma fail to calculate scaled residuals?
If you try to calculate the scaled residuals via DHARMa functions for an unsupported model, you will get a warning and then an error. DHARMa attempts to make predictions from the model to simulate with, but it will then fail. This is an indication that you’d to use createDHARMa () to make the residuals instead.
Is the glmmtmb function in Dharma currently supported?
The glmmTMB() function from package glmmTMB is one of those models that DHARMa doesn’t currently support. (2018-04-05 update: the development version of DHARMA now supports glmmTMB objects for glmmTMB 0.2.1.
Which is the correct distribution for GLm residuals?
However, as stated in the comments, the residuals should be distributed according to a negative binomial distribution. In my opinion, this comes closest to the truth as GLM residuals can have other distributions than the normal one.
Can you use dharma to make predictions from a model?
DHARMa attempts to make predictions from the model to simulate with, but it will then fail. This is an indication that you’d to use createDHARMa () to make the residuals instead. I can simulate from my model via the simulate () function (see the documentation for ?simulate.glmmTMB for details).
Can you use dharma to check unsupported models?
Below I fit zero-inflated negative binomial model with glmmTMB (). If you try to calculate the scaled residuals via DHARMa functions for an unsupported model, you will get a warning and then an error. DHARMa attempts to make predictions from the model to simulate with, but it will then fail.