Description Usage Arguments Value References Examples
View source: R/bootstrap_functions.R
Let B be the number of bootstrap samples, indexed by b=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 b.
1 |
AsByB |
a list of the PCs matrices for each bootstrap sample, indexed by b. Each element of this list should be a (n by K) matrix, where K is the number of PCs of interest, and n is the sample size. |
V |
a tall (p by n) matrix containing the PCs of the original sample, where n is sample size, and p is sample dimension. |
pattern |
if |
... |
passed to |
a B
-length list of (p
by K
) PC matrices on the original sample coordinate space (denoted here as V^b). This is achieved by the matrix multiplication V^b=VA^b. Note that here, V^b denotes the b^{th} bootstrap PC matrix, not V raised to the power b. This notation is the same as the notation used in (Fisher et al., 2014).
Aaron Fisher, Brian Caffo, and Vadim Zipunnikov. Fast, Exact Bootstrap Principal Component Analysis for p>1 million. 2014. http://arxiv.org/abs/1405.0922
1 2 3 4 5 6 7 8 9 10 11 12 | #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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.