As2Vs {bootSVD}R Documentation

Convert low dimensional bootstrap components to high dimensional bootstrap components

Description

Let BB be the number of bootstrap samples, indexed by b=1,2,...Bb=1,2,...B. As2Vs is a simple function converts the list of principal component (PC) matrices for the bootstrap scores to a list of principal component matrices on the original high dimensional space. Both of these lists, the input and the output of As2Vs, are indexed by bb.

Usage

As2Vs(AsByB, V, pattern = NULL, ...)

Arguments

AsByB

a list of the PCs matrices for each bootstrap sample, indexed by bb. Each element of this list should be a (nn by KK) matrix, where KK is the number of PCs of interest, and nn is the sample size.

V

a tall (pp by nn) matrix containing the PCs of the original sample, where nn is sample size, and pp is sample dimension.

pattern

if V is a class ff object, the returned value will also be a class ff object. pattern is passed to ff in creation of the output.

...

passed to mclapply.

Value

a B-length list of (p by K) PC matrices on the original sample coordinate space (denoted here as VbV^b). This is achieved by the matrix multiplication Vb=VAbV^b=VA^b. Note that here, VbV^b denotes the bthb^{th} bootstrap PC matrix, not VV raised to the power bb. This notation is the same as the notation used in (Fisher et al., 2014).

References

Aaron Fisher, Brian Caffo, and Vadim Zipunnikov. Fast, Exact Bootstrap Principal Component Analysis for p>1 million. 2014. http://arxiv.org/abs/1405.0922

Examples

#use small n, small B, for a quick illustration
set.seed(0)
Y<-simEEG(n=100, centered=TRUE, wide=TRUE) 
svdY<-fastSVD(Y)
DUt<- tcrossprod(diag(svdY$d),svdY$u)
bInds<-genBootIndeces(B=50,n=dim(DUt)[2])
bootSVD_LD_output<-bootSVD_LD(DUt=DUt,bInds=bInds,K=3,verbose=interactive())

Vs<-As2Vs(As=bootSVD_LD_output$As,V=svdY$v)
# Yields the high dimensional bootstrap PCs (left singular 
# vectors of the bootstrap sample Y), 
# indexed by b = 1,2...B, where B is the number of bootstrap samples

[Package bootSVD version 1.1 Index]