gCCA_select: Dimension selection for gCCA using random permutation test

View source: R/gCCA_select.R

gCCA_selectR Documentation

Dimension selection for gCCA using random permutation test

Description

Dimension selection for gCCA using random permutation test

Usage

gCCA_select(X, nboot = 1000, ncores = 12, seed.offset = 1234)

Arguments

X

: input data list

nboot

(default 1000) number of permutation

ncores

(default 12) number of cores for permutation test

seed.offset

(default 1234)

Value

glcca.dim : selected dimension

dat bootstrapped data

Examples

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)


seonjoo/lcca documentation built on April 29, 2024, 12:03 a.m.