getCanWeightsMulti {SmCCNet} | R Documentation |
Get Canonical Weight SmCCA Algorithm (No Subsampling)
Description
Run Sparse multiple Canonical Correlation Analysis (SmCCA) and return canonical weight vectors.
Usage
getCanWeightsMulti(
X,
Trait = NULL,
Lambda,
CCcoef = NULL,
NoTrait = TRUE,
trace = FALSE,
TraitWeight = FALSE
)
Arguments
X |
A list of omics data each with n subjects. |
Trait |
An |
Lambda |
Lasso penalty vector with length equals to the number of omics data ( |
CCcoef |
Optional scaling factors for the SmCCA pairwise canonical
correlations. If |
NoTrait |
Whether or not trait (phenotype) information is provided, default is set to |
trace |
Whether to display CCA algorithm trace, default is set to |
TraitWeight |
Whether to return canonical weight for trait (phenotype), default is set to |
Value
A canonical weight vector with size of p
by 1.
Examples
# This function is typically used as an internal function.
# It is also used when performing cross-validation,
# refer to multi-omics vignette for more detail.
# X <- list(X1,X2)
# result <- getCanWeightsMulti(X, Trait = as.matrix(Y), Lambda = c(0.5,0.5), NoTrait = FALSE)
# result <- getCanWeightsMulti(X, Trait = NULL, Lambda = c(0.5,0.5), NoTrait = TRUE)
# cccoef <- c(1,10,10)
# result <- getCanWeightsMulti(X, Trait = as.matrix(Y), CCcoef = cccoef,
# Lambda = c(0.5,0.5), NoTrait = FALSE)