Skip to content

Automatically compare remedial models

Source: R/advancedRemediation.R ยท Help: ?autoCompareRemediations

Fits several remedial models for heteroscedasticity and compares their performance using AIC and residual RMSE. Currently evaluates weighted least squares and robust regression against the original model.

Usage

autoCompareRemediations(model, data = NULL)

Arguments

model
Fitted lm model or formula.
data
Optional data frame if model is a formula.

Value

A list with components metrics, models, and best indicating the recommended method.

Examples

data(mtcars)
m <- lm(mpg ~ wt + qsec, mtcars)
autoCompareRemediations(m)