gCCA_select | R Documentation |
Dimension selection for gCCA using random permutation test
gCCA_select(X, nboot = 1000, ncores = 12, seed.offset = 1234)
X |
: input data list |
nboot |
(default 1000) number of permutation |
ncores |
(default 12) number of cores for permutation test |
seed.offset |
(default 1234) |
glcca.dim : selected dimension
dat bootstrapped data
ndim=50
L1=L2=rep(0,ndim)
L1[1:5]<-1
L2[6:10]<-1
L = cbind(c(L1,L1,L1),c(L2,L2,rep(0, ndim)))#;L=L/sqrt(sum(L*L))
sigma =0.5*as.matrix(L) %*% t(as.matrix(L));diag(sigma)<-1
n=300
set.seed(123)
Xtmp = mvrnorm(n,mu=rep(0,ndim*3), Sigma=sigma)
X = list(Xtmp[,1:ndim],Xtmp[,1:ndim+ndim],Xtmp[,1:ndim+(2*ndim)])
fit.gcca <- gCCA(lapply(X, scale),0)
gCCA_select(X, nboot=300,ncores=12,seed.offset=1234)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.