Robust White test with bootstrap and effect sizes¶
Source: R/robust_implementations.R · Help: ?performWhiteTestRobust
Extends performWhiteTest() with optional bootstrap resampling, confidence
intervals, effect size reporting, and power analysis.
Usage¶
performWhiteTestRobust(
model,
data = NULL,
method = c("standard", "reduced"),
bootstrap = FALSE,
B = 999,
ci_level = 0.95,
parallel = FALSE
)
Arguments¶
model- A fitted stats::lm object representing the mean specification to be diagnosed.
data- A base::data.frame (or object coercible to one) containing the
variables referenced by
model. It must include the observations used to fitmodeland will be checked for missing values. WhenNULL, the default, the model frame ofmodelis used. It holds the terms of the model rather than its variables (log(x)rather thanx), so a model that transforms a variable needsdata, as does a model with anoffset()term, and so may a fit whoseweightsoroffsetargument is a column of the data, which the model frame holds as(weights)or(offset). method- Character string selecting the auxiliary specification. "standard" retains squares and cross-products, while "reduced" excludes cross-products for high-dimensional designs.
bootstrap- Logical, compute bootstrap diagnostics for the
statistic and p-value? The bootstrap is
bootstrapTestStatistic(), so on a fit returned byfitWLS()each replicate estimates the weights again, its default since 0.15.0. There is no argument to hold them fixed here;bootstrapTestStatistic()withreestimate_weights = FALSEdoes that. B- Number of bootstrap replications when
bootstrap = TRUE. Defaults to 999, at which a bootstrap p-value of the form(1 + #) / (B + 1)gives an exact test at the 5% and 1% levels; it was 1000 before 0.15.0. The value is recorded inrobust_details$bootstrap$Bwhether or not the bootstrap runs. ci_level- Confidence level for reported intervals.
parallel- Logical, allow parallel bootstrap evaluation when the
parallelpackage is available. A seeded call gives the same result each time; see Parallel replicates inbootstrapTestStatistic().
Value¶
An object of class htest augmented with a
robust_details list containing bootstrap, effect size, and power
information.
Details¶
Provides enriched inference around the White test by combining bootstrap
resampling (Efron & Tibshirani, 1993) with asymptotic approximations. The
robust_details element summarises interval estimates, effect sizes, and power
calculations to aid decision-making.
References¶
White, H. (1980). A heteroskedasticity-consistent covariance matrix estimator and a direct test for heteroscedasticity. Econometrica, 48(4), 817–838.
Efron, B., & Tibshirani, R. J. (1993). An Introduction to the Bootstrap. Chapman & Hall.
See also¶
performWhiteTest() for the base statistic and
performWhiteTestBootstrap() for a lighter-weight resampling option.