fit_nbz = glmmTMB(count ~ spp + mined + (1|site), I’m going to use one of the models from the glmmTMB documentation to demonstrate how to make the simulations and then use them in createDHARMa().īelow I fit zero-inflated negative binomial model with glmmTMB(). ![]() There is a simulate() function for glmmTMB objects. I believe the example below is still useful for showing how to work with DHARMa-unsupported model types that have a simulate() function.) ( update: the development version of DHARMA now supports glmmTMB objects for glmmTMB 0.2.1. The glmmTMB() function from package glmmTMB is one of those models that DHARMa doesn’t currently support. Below I show how to do this for a couple of different situations. Luckily, DHARMa can simulate residuals for any model as long as the user can provide simulated values to the createDHARMa() function. However, students aren’t always working with models that DHARMa currently supports. These days I’m been happily recommending the DHARMa packages to students I work with for residual checks of GLMM’s. If you are interested in trying the package out, it has a very nice vignette to get you started. ![]() 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. This left me unable to recommend this as a general approach to folks I consult with. I didn’t have a metric to help me decide if my actual residual plot seemed unusual compared to residual plots from my “true” models. I found my “brute force” simulation approach useful, but I spent a lot of time visually comparing the simulated plots to my real plot.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |