wh.test: White heteroscedasticity test

Description Usage Arguments Value References See Also Examples

View source: R/wh.test.R

Description

White's test for heteroskedastic errors.

Usage

1
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 dataframe 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

List including:

hyp Character matrix of hypotheses (if hyp = TRUE).
results A dataframe 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

wh.test, bptest

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# 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)

andronikoss/desk documentation built on June 3, 2017, 7:05 p.m.