Description Usage Arguments Value Examples
View source: R/bootstrap_functions.R
Used to study of the bootstrap distribution of the k^th singular values, by re-indexing the list of d^b vectors to be organized by PC index (k) rather than bootstrap index (b).
1 | reindexVectorsByK(vectorsByB)
|
vectorsByB |
a |
a K
-length list of (B by n) matrices, where each matrices' rows refers to the values from a different bootstrap sample.
1 2 3 4 5 6 7 8 9 10 11 | #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())
dsByK<-reindexVectorsByK(bootSVD_LD_output$ds)
boxplot(dsByK[[1]],main='Bootstrap distribution of 1st singular value')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.