white_test_boot {whitestrap} | R Documentation |
Bootstrapped version of the White's test (Jeong, J., Lee, K. (1999))
Description
This is a versioned White's test based on a bootstrap procedure that can improve the performance of White’s test, specially in small samples. It was proposed by Jeong, J., Lee, K. (1999) (see references for further details).
Usage
white_test_boot(model, bootstraps = 1000)
Arguments
model |
An object of class |
bootstraps |
Number of bootstrap to be performed. If 'bootstraps' is less than 10, it will automatically be set to 10. At least 500 simulations are recommended. Default value is set to 1000. |
Details
The bootstrapped error term is defined by:
\widehat{u_i} = \sigma^2 * t_i^{*} (i = 1,...N)
where t_i^{*}
follows a distribution satisfying E(t) = 0
and var(t) = I
.
In particular, the selected distribution of t
can be found at the bottom of page 196 at Handbook of Computational Econometrics (2009).
Value
A list with class white_test
containing:
w_stat | The value of the test statistic |
p_value | The p-value of the test |
iters | The number of bootstrap samples |
References
Jeong, J., & Lee, K. (1999). Bootstrapped White’s test for heteroskedasticity in regression models. Economics Letters, 63(3), 261-267.
White, H. (1980). A Heteroskedasticity-Consistent Covariance Matrix Estimator and a Direct Test for Heteroskedasticity. Econometrica, 48(4), 817-838.
Wooldridge, Jeffrey M., 1960-. (2012). Introductory econometrics : a modern approach. Mason, Ohio : South-Western Cengage Learning,
Examples
# Define a dataframe with heteroscedasticity
n <- 100
y <- 1:n
sd <- runif(n, min = 0, max = 4)
error <- rnorm(n, 0, sd*y)
X <- y + error
df <- data.frame(y, X)
# OLS model
fit <- lm(y ~ X, data = df)
# White's test
white_test_boot(fit)