Learn R Programming

multivarious (version 0.2.0)

bootstrap.pca: PCA Bootstrap Resampling

Description

Perform bootstrap resampling for Principal Component Analysis (PCA) to estimate component and score variability.

Usage

# S3 method for pca
bootstrap(x, nboot = 100, k = ncomp(x), ...)

Value

A list containing bootstrap z-scores for the loadings (zboot_loadings) and scores (zboot_scores).

Arguments

x

A fitted PCA model object.

nboot

The number of bootstrap resamples (default: 100).

k

The number of components to bootstrap (default: all components in the fitted PCA model).

...

Additional arguments to be passed to the specific model implementation of bootstrap.

References

Fisher, Aaron, Brian Caffo, Brian Schwartz, and Vadim Zipunnikov. 2016. "Fast, Exact Bootstrap Principal Component Analysis for P > 1 Million." Journal of the American Statistical Association 111 (514): 846-60.

Examples

Run this code
X <- matrix(rnorm(10*100), 10, 100)
x <- pca(X, ncomp=9)
bootstrap_results <- bootstrap(x)

Run the code above in your browser using DataLab