Skip to content

Summarise heteroscedasticity test results

Source: R/advancedDiagnostics.R ยท Help: ?compareTestResults

Runs selected diagnostics for a single model and returns a tidy data frame of test statistics and p-values.

Usage

compareTestResults(model, data = NULL, tests = c("white", "koenker"))

Arguments

model
A fitted lm model or a formula.
data
Data frame used if model is a formula.
tests
Character vector of heteroscedasticity tests. Defaults to the White and Koenker tests, the default of runHeteroTests(); it was the White and the classical Breusch-Pagan tests up to 0.14.0.

Value

Data frame with columns test, statistic, and p.value.

Examples

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