deflate_mtx | R Documentation |
This function removes the variance of given component t
from the
input matrix X
.
\hat{X} = X - t (t^{\top}t)^{-1}t^{\top}X
It is a built-in function of PLSDA_batch
.
deflate_mtx(X, t)
X |
A numeric matrix to be deflated. It assumes that samples are
on the row, while variables are on the column. |
t |
A component to be deflated out from the matrix. |
A deflated matrix with the same dimension as the input matrix.
Yiwen Wang, Kim-Anh LĂȘ Cao
barker2003partialPLSDAbatch
# A built-in function of PLSDA_batch, not separately used.
# Not run
data('AD_data')
library(mixOmics)
library(TreeSummarizedExperiment)
X <- assays(AD_data$EgData)$Clr_value
ad_pca <- pca(X, ncomp = 3)
# the matrix without the information of PC1:
ad.def.mtx <- deflate_mtx(X, ad_pca$variates$X[ ,1])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.