Skip to content

DHARMa

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

v0.4.7 · Oct 18, 2024 · GPL (>= 3)

Description

The 'DHARMa' package 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', and 'spaMM'; 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, phylogenetic and temporal autocorrelation.

Downloads

21.6K

Last 30 days

813th

63.8K

Last 90 days

250.1K

Last year

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

CRAN Check Status

14 OK
Show all 14 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-macos-arm64 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 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026

Reverse Dependencies (21)

Dependency Network

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

Version History

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
updated 0.2.7 ← 0.2.6 diff Feb 5, 2020
updated 0.2.6 ← 0.2.5 diff Nov 25, 2019
updated 0.2.5 ← 0.2.4 diff Nov 17, 2019
updated 0.2.4 ← 0.2.3 diff Mar 5, 2019
updated 0.2.3 ← 0.2.2 diff Feb 11, 2019
updated 0.2.2 ← 0.2.1 diff Jan 19, 2019