The goal of modeldiag is to provide comprehensive diagnostic checks for statistical models including linear models, generalized linear models, and survival models.
You can install the development version of modeldiag from GitHub with:
# install.packages("devtools")
devtools::install_github("Teniola17/modeldiag")This is a basic example which shows you how to diagnose a linear model:
library(modeldiag)
# Fit a linear model
model <- lm(mpg ~ wt + hp + disp, data = mtcars)
# Run diagnostics
diagnostics <- diagnose_model(model)
# View summary
summary(diagnostics)
# Plot diagnostics
plot(diagnostics)The package currently supports:
lm): Tests for
multicollinearity, heteroscedasticity, autocorrelation, normality, and
outliersglm):
coxph): Tests for proportional hazards assumption,
influential observations, and functional formEach model type has specific diagnostic tests:
The plot() method provides model-specific diagnostic
plots:
If you encounter a bug, please file an issue with a minimal reproducible example on GitHub.# m o d e l d i a g
Need a high-speed mirror for your open-source project?
Contact our mirror admin team at info@clientvps.com.
This archive is provided as a free public service to the community.
Proudly supported by infrastructure from VPSPulse , RxServers , BuyNumber , UnitVPS , OffshoreName and secure payment technology by ArionPay.