The 'DHARMa' package uses a simulationbased approach to create readily interpretable scaled (quantile) residuals for fitted (generalized) linear mixed models. Currently supported are linear and generalized linear (mixed) models from 'lme4' (classes 'lmerMod', 'glmerMod'), 'glmmTMB' 'GLMMadaptive' and 'spaMM', generalized additive models ('gam' from 'mgcv'), 'glm' (including 'negbin' from 'MASS', but excluding quasidistributions) and 'lm' model classes. Moreover, externally created simulations, e.g. posterior predictive simulations from Bayesian software such as 'JAGS', 'STAN', or 'BUGS' can be processed as well. The resulting residuals are standardized to values between 0 and 1 and can be interpreted as intuitively as residuals from a linear regression. The package also provides a number of plot and test functions for typical model misspecification problems, such as over/underdispersion, zeroinflation, and residual spatial and temporal autocorrelation.
Package details 


Author  Florian Hartig [aut, cre] (<https://orcid.org/0000000262559059>), Lukas Lohse [ctb] 
Maintainer  Florian Hartig <florian.hartig@biologie.uniregensburg.de> 
License  GPL (>= 3) 
Version  0.4.4 
URL  http://florianhartig.github.io/DHARMa/ 
Package repository  View on CRAN 
Installation 
Install the latest version of this package by entering the following in R:

Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.