Comprehensive Diagnostics for Statistical Models
Overview
Provides a unified framework for diagnosing common issues in statistical models including linear models, generalized linear models (logistic and Poisson regression), and survival models. Implements tests for multicollinearity, heteroscedasticity, autocorrelation, normality, influential observations, overdispersion, zero-inflation, and proportional hazards assumptions. Includes visualization methods for graphical diagnostics. Methods are based on established approaches including Fox and Monette (1992) doi:10.1080/01621459.1992.10475190, Breusch and Pagan (1979) doi:10.2307/1911963, and Dean and Lawless (1989) doi:10.1080/01621459.1989.10478792.
- Initial CRAN submission.
- Added
diagnose_model()generic function with methods for: - Linear models (
lm) - Generalized linear models (
glm) with binomial and poisson families - Cox proportional hazards models (
coxph) - Implemented comprehensive diagnostic tests:
- Multicollinearity (VIF)
- Heteroscedasticity (Breusch-Pagan test)
- Autocorrelation (Durbin-Watson test)
- Normality (Shapiro-Wilk test)
- Influential observations (Cook's distance, dfbetas)
- Overdispersion (Poisson models)
Show all changes in 0.1.0Hide the rest of the changes in 0.1.0
- Zero-inflation (Poisson models)
- Proportional hazards (Cox models)
- Linearity of logit (Logistic models)
- Goodness of fit (Hosmer-Lemeshow test)
- Added
print(),summary(), andplot()methods for diagnostic results - Comprehensive plotting capabilities for visual diagnostics
- Full documentation with roxygen2
- Unit tests with testthat
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- OK7 OK2026-05-29
Documentation
- Help pages
- 7 (1 internal)includes a package overview page
- Examples that run
- 100%1 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 0%
Downloads
Repository
6 development-tooling and community-health practices detected across 4 families in the upstream repository
Checks run against github.com/teniola17/modeldiag on 2026-10-18.
GitHub Pages site last deployed 2026-06-09
Dependencies
Installing modeldiag adds 62 packages (32 with compiled code, 55 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, doBy 4.3 MB.
Code & Tests
People & History
- 0.1.0Latest2026-05-28 · current release
- RR 4.6.0 released · 2026-04-24
Package metadata
- First published
- 2026-05-28
- Total releases
- 1 / 1 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 3.5.0
- Download size
- 42 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("modeldiag")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-21, which the citation names so these numbers can be found later. More on citing and the projects behind them.