wh.test: White Heteroskedasticity Test

View source: R/wh.test.R

wh.testR Documentation

White Heteroskedasticity Test

Description

White's test for heteroskedastic errors.

Usage

wh.test(mod, data = list(), sig.level = 0.05, details = FALSE, hyp = TRUE)

Arguments

mod

estimated linear model object or formula.

data

if mod is a formula then the corresponding data frame has to be specified.

sig.level

significance level. Default value: sig.level = 0.05.

details

logical value indicating whether specific details about the test should be returned.

hyp

logical value indicating whether the hypotheses should be returned.

Value

A list object including:

hyp character matrix of hypotheses (if hyp = TRUE).
results a data frame of basic test results.
hreg matrix of aux. regression results.
stats additional statistic of aux. regression.
nulldist type of the null distribution with its parameters.

References

White, H. (1980): A Heteroskedasticity-Consistent Covariance Matrix Estimator and a Direct Test for Heteroskedasticity. Econometrica 48, 817-838.

See Also

bptest.

Examples

## White test for a model with two regressors
X <- wh.test(wage ~ educ + age, data = data.wage)

## Show the auxiliary regression results
X$hreg

## Prettier way
print(X, details = TRUE)

## Plot the test result
plot(X)


desk documentation built on May 29, 2024, 6:05 a.m.

Related to wh.test in desk...