cdiagnose: Graphically diagnose model residuals ("classic" version with...

View source: R/cdiagnose.R

cdiagnoseR Documentation

Graphically diagnose model residuals ("classic" version with ggplot2 graphics).

Description

Graphically diagnose model residuals ("classic" version with ggplot2 graphics).

Usage

cdiagnose(model, fit_type = 'response', residual_type = 'response', se = FALSE, alpha = 1)

Arguments

model

An lm or glm object.

fit_type

String. Default is "response". Type of fitted values to use based on options in predict().

residual_type

String. Default is "response". Type of residuals values to use based on options in resid().

se

Boolean. To overlay standard errors.

alpha

Integer, [0, 1]. Points are more transparent the closer they are to 0.

Value

2x2 charts that closely resemble the output to plot(model.lm) with ggplot2 graphics.

See Also

https://github.com/robertschnitman/diagnoser and Raju Rimal (inspiration for Residuals vs. Leverage): https://rpubs.com/therimalaya/43190

Examples

model.lm <- lm(data = mtcars, formula = mpg ~ wt + gear)
cdiagnose(model.lm)

robertschnitman/schnitr documentation built on Aug. 18, 2022, 8:39 p.m.