High-dimensional projection heteroscedasticity test¶
Source: R/modern_diagnostics.R · Help: ?performHighDimensionalTest
Applies principal component projections to the design matrix and evaluates a Breusch-Pagan style statistic on the reduced representation. The procedure is designed for settings where the number of predictors rivals or exceeds the sample size.
Usage¶
Arguments¶
model- A fitted stats::lm object describing the mean structure whose residual variance is to be assessed.
data- A base::data.frame (or compatible object) containing the
variables referenced in
model. The data must include all observations used to fitmodeland should not contain unresolved 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). variance_threshold- Proportion of predictor variance that the selected principal components should explain. Defaults to 0.9.
max_components- Optional upper bound on the number of principal
components to retain. Defaults to
min(10, n - 5).
Value¶
An htest object summarising the chi-squared statistic
of the auxiliary regression on principal component scores.
References¶
Fan, J., & Lv, J. (2008). Sure independence screening for ultrahigh dimensional feature space. Journal of the Royal Statistical Society: Series B, 70(5), 849–911.