Skip to content

Create a diagnostic object

Source: man/HeteroDiagnostic.Rd ยท Help: ?HeteroDiagnostic

Create a diagnostic object that exposes test(), plot() and summary() methods. Formulas are accepted for convenience.

Usage

HeteroDiagnostic(model, data = NULL)

Arguments

model
A fitted lm, or a glm with the Gaussian family and the identity link, or a formula. The tests refuse a glm of any other family or link since 0.15.0.
data
Data used to fit the model when model is a formula.

Value

An object of class HeteroDiagnostic.

Examples

 data(mtcars)
 m <- lm(mpg ~ wt + qsec, data = mtcars)
 d <- HeteroDiagnostic(m, mtcars)
 runDiagnostics(d$model, d$data)