block.spls | R Documentation |
Integration of multiple data sets measured on the same samples or observations, with variable selection in each data set, ie. N-integration. The method is partly based on Generalised Canonical Correlation Analysis.
block.spls(
X,
Y,
indY,
ncomp = 2,
keepX,
keepY,
design,
mode,
scale = TRUE,
tol = 1e-06,
max.iter = 100,
near.zero.var = FALSE,
all.outputs = TRUE,
verbose.call = FALSE
)
X |
A named list of data sets (called 'blocks') measured on the same samples. Data in the list should be arranged in matrices, samples x variables, with samples order matching in all data sets. |
Y |
Matrix response for a multivariate regression framework. Data
should be continuous variables (see |
indY |
To supply if |
ncomp |
the number of components to include in the model. Default to 2. Applies to all blocks. |
keepX |
A named list of same length as X. Each entry is the number of variables to select in each of the blocks of X for each component. By default all variables are kept in the model. |
keepY |
Only if Y is provided (and not |
design |
numeric matrix of size (number of blocks in X) x (number of
blocks in X) with values between 0 and 1. Each value indicates the strenght
of the relationship to be modelled between two blocks; a value of 0
indicates no relationship, 1 is the maximum value. Alternatively, one of
c('null', 'full') indicating a disconnected or fully connected design,
respecively, or a numeric between 0 and 1 which will designate all
off-diagonal elements of a fully connected design (see examples in
|
mode |
Character string indicating the type of PLS algorithm to use. One
of |
scale |
Logical. If scale = TRUE, each block is standardized to zero means and unit variances (default: TRUE) |
tol |
Positive numeric used as convergence criteria/tolerance during the
iterative process. Default to |
max.iter |
Integer, the maximum number of iterations. Default to 100. |
near.zero.var |
Logical, see the internal |
all.outputs |
Logical. Computation can be faster when some specific
(and non-essential) outputs are not calculated. Default = |
verbose.call |
Logical (Default=FALSE), if set to TRUE then the |
block.spls
function fits a horizontal sPLS model with a specified
number of components per block). An outcome needs to be provided, either by
Y
or by its position indY
in the list of blocks X
.
Multi (continuous)response are supported. X
and Y
can contain
missing values. Missing values are handled by being disregarded during the
cross product computations in the algorithm block.pls
without having
to delete rows with missing data. Alternatively, missing data can be imputed
prior using the nipals
function.
The type of algorithm to use is specified with the mode
argument.
Four PLS algorithms are available: PLS regression ("regression")
, PLS
canonical analysis ("canonical")
, redundancy analysis
("invariant")
and the classical PLS algorithm ("classic")
(see
References and ?pls
for more details).
Note that our method is partly based on sparse Generalised Canonical Correlation Analysis and differs from the MB-PLS approaches proposed by Kowalski et al., 1989, J Chemom 3(1), Westerhuis et al., 1998, J Chemom, 12(5) and sparse variants Li et al., 2012, Bioinformatics 28(19); Karaman et al (2014), Metabolomics, 11(2); Kawaguchi et al., 2017, Biostatistics.
Variable selection is performed on each component for each block of
X
, and for Y
if specified, via input parameter keepX
and keepY
.
Note that if Y
is missing and indY
is provided, then variable
selection on Y
is performed by specifying the input parameter
directly in keepX
(no keepY
is needed).
block.spls
returns an object of class "block.spls"
, a
list that contains the following components:
X |
the centered and standardized original predictor matrix. |
indY |
the position of the outcome Y in the output list X. |
ncomp |
the number of components included in the model for each block. |
mode |
the algorithm used to fit the model. |
keepX |
Number of variables used to build each component of each block |
keepY |
Number of variables used to build each component of Y |
variates |
list containing the variates of each block of X. |
loadings |
list containing the estimated loadings for the variates. |
names |
list containing the names to be used for individuals and variables. |
nzv |
list containing the zero- or near-zero predictors information. |
iter |
Number of iterations of the algorithm for each component |
prop_expl_var |
Percentage of explained variance for each component and each block after setting possible missing values in the centered data to zero |
call |
if |
Note that the argument 'scheme' has now been hardcoded to 'horst' and 'init' to 'svd.single'.
Florian Rohart, Benoit Gautier, Kim-Anh Lê Cao, Al J Abadi
Tenenhaus, M. (1998). La regression PLS: theorie et pratique. Paris: Editions Technic.
Wold H. (1966). Estimation of principal components and related models by iterative least squares. In: Krishnaiah, P. R. (editors), Multivariate Analysis. Academic Press, N.Y., 391-420.
Tenenhaus A. and Tenenhaus M., (2011), Regularized Generalized Canonical Correlation Analysis, Psychometrika, Vol. 76, Nr 2, pp 257-284.
Tenenhaus A., Philippe C., Guillemot V, Lê Cao K.A., Grill J, Frouin V. Variable selection for generalized canonical correlation analysis. Biostatistics. kxu001
plotIndiv
, plotArrow
,
plotLoadings
, plotVar
, predict
,
perf
, selectVar
, block.pls
,
block.splsda
and http://www.mixOmics.org for more details.
# Example with multi omics TCGA study
# -----------------------------
data("breast.TCGA")
# this is the X data as a list of mRNA and miRNA; the Y data set is a single data set of proteins
data = list(mrna = breast.TCGA$data.train$mrna, mirna = breast.TCGA$data.train$mirna)
# set up a full design where every block is connected
design = matrix(1, ncol = length(data), nrow = length(data),
dimnames = list(names(data), names(data)))
diag(design) = 0
design
# set number of component per data set
ncomp = c(2)
# set number of variables to select, per component and per data set (this is set arbitrarily)
list.keepX = list(mrna = rep(10, 2), mirna = rep(10,2))
list.keepY = c(rep(10, 2))
TCGA.block.spls = block.spls(X = data, Y = breast.TCGA$data.train$protein,
ncomp = ncomp, keepX = list.keepX, keepY = list.keepY, design = design)
TCGA.block.spls
# in plotindiv we color the samples per breast subtype group but the method is unsupervised!
plotIndiv(TCGA.block.spls, group = breast.TCGA$data.train$subtype, ind.names = FALSE, legend=TRUE)
# illustrates coefficient weights in each block
plotLoadings(TCGA.block.spls, ncomp = 1)
plotVar(TCGA.block.spls, style = 'graphics', legend = TRUE)
## plot markers (selected markers) for mrna and mirna
group <- breast.TCGA$data.train$subtype
# mrna: show each selected feature separately and group by subtype
plotMarkers(object = TCGA.block.spls, comp = 1, block = 'mrna', group = group)
# mrna: aggregate all selected features, separate by loadings signs and group by subtype
plotMarkers(object = TCGA.block.spls, comp = 1, block = 'mrna', group = group, global = TRUE)
# proteins
plotMarkers(object = TCGA.block.spls, comp = 1, block = 'Y', group = group)
## only show boxplots
plotMarkers(object = TCGA.block.spls, comp = 1, block = 'Y', group = group, violin = FALSE)
## Not run:
network(TCGA.block.spls)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.