Skip to content

DHARMa

Residual Diagnostics for Hierarchical (Multi-Level / Mixed) Regression Models

v0.5.0 · Jun 1, 2026 · GPL (>= 3)

Description

"Uses a simulation-based 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', 'spaMM', and 'brms' (simple models); phylogenetic linear models from 'phylolm' (classes 'phylolm' and 'phyloglm'); generalized additive models ('gam' from 'mgcv'); 'glm' (including 'negbin' from 'MASS', but excluding quasi-distributions) 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, zero-inflation, and residual spatial, temporal and phylogenetic autocorrelation."

Downloads

27.3K

Last 30 days

707th

76.7K

Last 90 days

281.2K

Last year

Trend: -0.5% (30d vs prior 30d)

CRAN Check Status

13 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Jun 9, 2026
ERROR 12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Jun 8, 2026
ERROR r-devel-linux-x86_64-debian-gcc

package dependencies

Package required but not available: ‘gap’

Packages suggested but not available for checking:
  'mgcViz', 'glmmTMB', 'brms'

Package which this enhances but not available for checking: ‘BayesianTools’

See section ‘The DESCRIPTION file’ in the ‘Writing R Extensions’
manual.
OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026

Reverse Dependencies (23)

Dependency Network

Dependencies Reverse dependencies Matrix gap lmtest ape qgam lme4 AssumpSure BayesianTools RMeDPower2 bizicount eDITH insurancerating regressinator rfriend seqwrap GLMMadaptive GLMMcosinor dsem easystats ecostats ewp +8 more reverse deps DHARMa

Version History

30 tracked
updated 0.5.0 ← 0.4.7 diff Jun 1, 2026
new 0.4.7 Mar 10, 2026
updated 0.4.7 ← 0.4.6 diff Oct 17, 2024
updated 0.4.6 ← 0.4.5 diff Sep 7, 2022
updated 0.4.5 ← 0.4.4 diff Jan 15, 2022
updated 0.4.4 ← 0.4.3 diff Sep 27, 2021
updated 0.4.3 ← 0.4.2 diff Jul 6, 2021
updated 0.4.2 ← 0.4.1 diff Jul 4, 2021
updated 0.4.1 ← 0.4.0 diff Apr 7, 2021
updated 0.4.0 ← 0.3.4 diff Mar 27, 2021
updated 0.3.4 ← 0.3.3.0 diff Mar 22, 2021
updated 0.3.3.0 ← 0.3.2.0 diff Sep 7, 2020
updated 0.3.2.0 ← 0.3.1 diff Jun 17, 2020
updated 0.3.1 ← 0.3.0 diff May 11, 2020
updated 0.3.0 ← 0.2.7 diff Apr 19, 2020