Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

tune.splslevel

Tuning functions for multilevel sPLS method


Description

For a multilevel spls analysis, the tuning criterion is based on the maximisation of the correlation between the components from both data sets

Usage

tune.splslevel(
  X,
  Y,
  multilevel,
  ncomp = NULL,
  mode = "regression",
  test.keepX = rep(ncol(X), ncomp),
  test.keepY = rep(ncol(Y), ncomp),
  already.tested.X = NULL,
  already.tested.Y = NULL
)

Arguments

X

numeric matrix of predictors. NAs are allowed.

Y

if(method = 'spls') numeric vector or matrix of continuous responses (for multi-response models) NAs are allowed.

multilevel

Design matrix for multilevel analysis (for repeated measurements) that indicates the repeated measures on each individual, i.e. the individuals ID. See Details.

ncomp

the number of components to include in the model.

mode

character string. What type of algorithm to use, (partially) matching one of "regression", "canonical", "invariant" or "classic".

test.keepX

numeric vector for the different number of variables to test from the X data set

test.keepY

numeric vector for the different number of variables to test from the Y data set

already.tested.X

Optional, if ncomp > 1 A numeric vector indicating the number of variables to select from the X data set on the firsts components.

already.tested.Y

Optional, if ncomp > 1 A numeric vector indicating the number of variables to select from the Y data set on the firsts components.

Details

For a multilevel spls analysis, the tuning criterion is based on the maximisation of the correlation between the components from both data sets

Value

cor.value

correlation between latent variables

Author(s)

Kim-Anh Lê Cao, Benoit Gautier, Francois Bartolo, Florian Rohart, Al J Abadi

References

mixOmics article: Rohart F, Gautier B, Singh A, Lê Cao K-A. mixOmics: an R package for 'omics feature selection and multiple data integration. PLoS Comput Biol 13(11): e1005752

See Also

splsda, predict.splsda and http://www.mixOmics.org for more details.

Examples

data(liver.toxicity)
# note: we made up those data, pretending they are repeated measurements
repeat.indiv <- c(1, 2, 1, 2, 1, 2, 1, 2, 3, 3, 4, 3, 4, 3, 4, 4, 5, 6, 5, 5,
6, 5, 6, 7, 7, 8, 6, 7, 8, 7, 8, 8, 9, 10, 9, 10, 11, 9, 9,
10, 11, 12, 12, 10, 11, 12, 11, 12, 13, 14, 13, 14, 13, 14,
13, 14, 15, 16, 15, 16, 15, 16, 15, 16)
summary(as.factor(repeat.indiv)) # 16 rats, 4 measurements each

# this is a spls (unsupervised analysis) so no need to mention any factor in design
# we only perform a one level variation split
design <- data.frame(sample = repeat.indiv)

tune.splslevel(X = liver.toxicity$gene,
Y=liver.toxicity$clinic,
multilevel = design,
test.keepX = c(5,10,15),
test.keepY = c(1,2,5),
ncomp = 1)

mixOmics

Omics Data Integration Project

v6.14.1
GPL (>= 2)
Authors
Kim-Anh Le Cao [aut, cre], Florian Rohart [aut], Ignacio Gonzalez [aut], Sebastien Dejean [aut], Al Abadi [ctb], Benoit Gautier [ctb], Francois Bartolo [ctb], Pierre Monget [ctb], Jeff Coquery [ctb], FangZou Yao [ctb], Benoit Liquet [ctb]
Initial release
2021-04-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.