View source: R/MultiOmicsSmCCA.R
getCanWeightsMulti | R Documentation |
Run Sparse multiple Canonical Correlation Analysis (SmCCA) and return canonical weight vectors.
getCanWeightsMulti(
X,
Trait = NULL,
Lambda,
CCcoef = NULL,
NoTrait = TRUE,
trace = FALSE,
TraitWeight = FALSE
)
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 |
A canonical weight vector with size of p
by 1.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.