boot_pca_sample.princals: Bootstrapping PCA sample princals method

View source: R/utility_functions.R

boot_pca_sample.princalsR Documentation

Bootstrapping PCA sample princals method

Description

This function is passed to the statistic argument of the boot function from the boot package. It generates a bootstrapped PCA sample, extracting the standardized loadings using non-linear PCA (Gifi::princals()).

Usage

## S3 method for class 'princals'
boot_pca_sample(data, indices, pca, original_loadings, ndim, pb = NULL, ...)

Arguments

data

The data argument passed from the boot function

indices

The indices of the rows for the bootstrapped sample passed from the boot function

pca

Object of class princals

original_loadings

The data.frame containing the standardized loadings of the original sample.

ndim

Numeric. Number of PCs to save (1 to ndim).

pb

Object of class "Progress_bar" "R6" generated by progess::progress_bar$new(). Not required.

...

Not in use

Details

A major problem of performing bootstrapping procedures in PCA is what is known as sign reflection: the change of the sign (positive/negative) on the component loadings in a PC given slight variations in the data. In addition, component/factor translocation can occur, meaning that the position of one component can change in a particular PCA solution, especially when two components have similar VAF. Another problem on performing PCAs with variations in the data is the possibility of rotation indeterminacy when the PCA solution of a resampled data presents with a different rotation of the original PCA solution. These issues generate artificially biased bootstrapped distributions, reducing the performance of the procedure. We have implemented a step of procrustes rotation between the original loadings (target) and the bootstrapped sample, which has previously been demonstrated to be a reasonable method to deal with such issues. The procrustes rotation is obtained by the pracma::procrustes() function.

Value

A matrix with one sample bootstrapped standardized loadings. This will be returned to the boot function when pc_stability function is called.

Author(s)

Abel Torres Espin

References

  1. Linting M, Meulman JJ, Groenen PJF, van der Kooij AJ. Stability of nonlinear principal components analysis: An empirical study using the balanced bootstrap. Psychol Methods. 2007;12(3):359–79.

  2. Babamoradi H, van den Berg F, Rinnan Å. Bootstrap based confidence limits in principal component analysis — A case study. Chemom Intell Lab Syst. 2013 Jan 15;120:97–105.

  3. Timmerman ME, Kiers HAL, Smilde AK. Estimating confidence intervals for principal component loadings: a comparison between the bootstrap and asymptotic results. Br J Math Stat Psychol. 2007 Nov;60(Pt 2):295–314


ucsf-ferguson-lab/syndRomics documentation built on June 26, 2022, 5:36 p.m.