Overview of DHARMa residual diagnostics
masterDHARMa (Residual Diagnostics for HierARchical Models) provides a simulation-based approach to create scaled (quantile) residuals for fitted generalized linear (mixed) models. These residuals are standardized to values between 0 and 1, making them as intuitively interpretable as residuals from a standard linear regression.
Supported Model Classes:
- Linear and GLMMs:
lme4(lmerMod,glmerMod),glmmTMB,GLMMadaptive, andspaMM. - Phylogenetic Models:
phylolm(phylolm,phyloglm). - Additive Models:
mgcv(gam). - GLMs:
glm(includingnegbinfromMASS, but excluding quasi-distributions) andlm. - Bayesian Simulations: Externally created simulations (e.g., posterior predictive simulations from
JAGS,STAN, orBUGS).
Key Capabilities:
- Standardized quantile residuals.
- Diagnostic tests and plots for model misspecification, including:
- Over/underdispersion
- Zero-inflation
- Residual spatial, temporal, and phylogenetic autocorrelation.