Skip to content

Perform Park test for heteroscedasticity

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

Regresses the log of squared residuals on the log of a suspected variable.

Usage

performParkTest(model, data = NULL, variable)

Arguments

model
an object of class lm.
data
data frame used to fit model. When NULL, the default, the model frame of model is used, so variable must then be a variable of the model. The model frame holds the terms of the model rather than its variables (log(x) rather than x), so a model that transforms a variable needs data, as does a model with an offset() term.
variable
name of the suspected explanatory variable.

Value

An object of class htest containing the t statistic, p-value and degrees of freedom.

Details

The slope coefficient from \(\log(e^2)\) regressed on \(\log x\) is tested for zero using a t statistic. A significant coefficient indicates scale depending on \(x\).

References

Park, R. E. (1966). Estimation with heteroscedastic error terms. Econometrica, 34(4), 888. doi:10.2307/1910108

Examples

 data(mtcars)
 m <- lm(mpg ~ wt + qsec, data = mtcars)
 performParkTest(m, mtcars, "wt")