Package: DHARMa 0.4.7
DHARMa: Residual Diagnostics for Hierarchical (Multi-Level / Mixed) Regression Models
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.
Authors:
DHARMa_0.4.7.tar.gz
DHARMa_0.4.7.zip(r-4.5)DHARMa_0.4.7.zip(r-4.4)DHARMa_0.4.7.zip(r-4.3)
DHARMa_0.4.7.tgz(r-4.4-any)DHARMa_0.4.7.tgz(r-4.3-any)
DHARMa_0.4.7.tar.gz(r-4.5-noble)DHARMa_0.4.7.tar.gz(r-4.4-noble)
DHARMa_0.4.7.tgz(r-4.4-emscripten)DHARMa_0.4.7.tgz(r-4.3-emscripten)
DHARMa.pdf |DHARMa.html✨
DHARMa/json (API)
NEWS
# Install 'DHARMa' in R: |
install.packages('DHARMa', repos = c('https://staffanbetner.r-universe.dev', 'https://cloud.r-project.org')) |
Bug tracker:https://github.com/florianhartig/dharma/issues
- hurricanes - Hurricanes
glmmregressionregression-diagnosticsresidual
Last updated 10 hours agofrom:126b4f4ebe. Checks:OK: 7. Indexed: no.
Target | Result | Date |
---|---|---|
Doc / Vignettes | OK | Nov 22 2024 |
R-4.5-win | OK | Nov 22 2024 |
R-4.5-linux | OK | Nov 22 2024 |
R-4.4-win | OK | Nov 22 2024 |
R-4.4-mac | OK | Nov 22 2024 |
R-4.3-win | OK | Nov 22 2024 |
R-4.3-mac | OK | Nov 22 2024 |
Exports:benchmarkRuntimecreateDatacreateDHARMagetFamilygetFittedgetFixedEffectsgetObservedResponsegetPearsonResidualsgetQuantilegetRandomStategetRefitgetResidualsgetSimulationsoutliersplotConventionalResidualsplotQQunifplotResidualsplotSimulatedResidualsrecalculateResidualsrunBenchmarkssimulateLRTsimulateResidualstestCategoricaltestDispersiontestGenerictestOutlierstestOverdispersiontestOverdispersionParametrictestPhylogeneticAutocorrelationtestQuantilestestResidualstestSimulatedResidualstestSpatialAutocorrelationtestTemporalAutocorrelationtestUniformitytestZeroInflationtransformQuantiles
Dependencies:apeaskpassbase64encbootbslibcachemclicodetoolscolorspacecommonmarkcpp11crayoncrosstalkcurldata.tabledigestdoParalleldplyrevaluatefansifarverfastmapfontawesomeforeachfsgapgap.datasetsgenericsggplot2gluegtablehighrhtmltoolshtmlwidgetshttpuvhttrisobanditeratorsjquerylibjsonliteknitrlabelinglaterlatticelazyevallifecyclelme4lmtestmagrittrMASSMatrixmemoisemgcvmimeminqamunsellnlmenloptropensslpillarpkgconfigplotlyplyrpromisespurrrqgamR6rappdirsrbibutilsRColorBrewerRcppRcppEigenRdpackrlangrmarkdownsassscalesshinysourcetoolsstringistringrsystibbletidyrtidyselecttinytexutf8vctrsviridisLitewithrxfunxtableyamlzoo
DHARMa for Bayesians
Rendered fromDHARMaForBayesians.Rmd
usingknitr::rmarkdown
on Nov 22 2024.Last update: 2022-09-08
Started: 2021-01-26
DHARMa: residual diagnostics for hierarchical (multi-level/mixed) regression models
Rendered fromDHARMa.Rmd
usingknitr::rmarkdown
on Nov 22 2024.Last update: 2024-10-28
Started: 2016-08-11
Readme and manuals
Help Manual
Help page | Topics |
---|---|
Benchmark runtimes of several functions | benchmarkRuntime |
Simulate test data | createData |
Create a DHARMa object from hand-coded simulations or Bayesian posterior predictive simulations. | createDHARMa |
Get model family | getFamily getFamily.default getFamily.phyloglm getFamily.phylolm |
Get fitted/predicted values | getFitted getFitted.default getFitted.gam getFitted.HLfit getFitted.MixMod getFitted.phyloglm getFitted.phylolm |
Extract fixed effects of a supported model | getFixedEffects getFixedEffects.default getFixedEffects.MixMod |
Get model response | getObservedResponse getObservedResponse.default getObservedResponse.HLfit getObservedResponse.phyloglm getObservedResponse.phylolm |
Get Pearson residuals | getPearsonResiduals getPearsonResiduals.default getPearsonResiduals.gam |
Calculate Residual Quantiles | getQuantile |
Record and restore a random state | getRandomState |
Get model refit | getRefit getRefit.default getRefit.glmmTMB getRefit.HLfit getRefit.lm getRefit.MixMod getRefit.phyloglm getRefit.phylolm |
Get model residuals | getResiduals getResiduals.default getResiduals.MixMod |
Get model simulations | getSimulations getSimulations.default getSimulations.gam getSimulations.glmmTMB getSimulations.HLfit getSimulations.lmerMod getSimulations.MixMod getSimulations.negbin getSimulations.phyloglm getSimulations.phylolm |
Histogram of DHARMa residuals | hist.DHARMa |
Hurricanes | hurricanes |
Return outliers | outliers |
DHARMa standard residual plots | plot.DHARMa |
Plots DHARMa benchmarks | plot.DHARMaBenchmark |
Conventional residual plot | plotConventionalResiduals |
Quantile-quantile plot for a uniform distribution | plotQQunif |
Generic res ~ pred scatter plot with spline or quantile regression on top | plotResiduals |
DHARMa standard residual plots | plotSimulatedResiduals |
Print simulated residuals | print.DHARMa |
Recalculate residuals with grouping | recalculateResiduals |
Return residuals of a DHARMa simulation | residuals.DHARMa |
Benchmark calculations | runBenchmarks |
Simulated likelihood ratio tests for (generalized) linear mixed models | simulateLRT |
Create simulated residuals | simulateResiduals |
Test for categorical dependencies | testCategorical |
DHARMa dispersion tests | testDispersion |
Test for a generic summary statistic based on simulated data | testGeneric |
Test for outliers | testOutliers |
Simulated overdisperstion tests | testOverdispersion |
Parametric overdisperstion tests | testOverdispersionParametric |
Plot distribution of p-values. | testPDistribution |
Test for phylogenetic autocorrelation | testPhylogeneticAutocorrelation |
Test for quantiles | testQuantiles |
DHARMa general residual test | testResiduals |
Residual tests | testSimulatedResiduals |
Test for distance-based spatial (or similar type) autocorrelation | testSpatialAutocorrelation |
Test for temporal autocorrelation | testTemporalAutocorrelation |
Test for overall uniformity | testUniformity |
Tests for zero-inflation | testZeroInflation |
Transform quantiles to pdf (deprecated) | transformQuantiles |