View source: R/supplementaryVariables4PLSC.R
supplementaryVariables4PLSC | R Documentation |
tepPLS
).supplementaryVariables4PLSC
:
Projects supplementary variables (columns)
for a PLSC analysis
(from tepPLS
).
The variables should be measured on the same observations
as the observations measured on the original analysis.
The original data consisted in 2 matrices denoted
X (dimensions N
by I
) and
Y (N
by J
).
The supplementary data denoted Vsup is a
N
by K
matrix, that can be considered
as originating either from X
(and then denoted Xsup) or Y
(and then denoted Ysup) .
If originating from X
(resp, Y) matrix Y (resp, X)
is the dual matrix.
Note that only the dual matrix
is needed to project supplementary
variables.
See details
for more.
supplementaryVariables4PLSC(
var.sup,
resPLSC,
Xset = NULL,
Yset = NULL,
X.center = TRUE,
X.scale = "SS1",
Y.center = TRUE,
Y.scale = "SS1",
dimNames = "Dimension "
)
var.sup |
Vsup: The |
resPLSC |
the results of
a PLSC analysis performed with
|
Xset |
the original X ( |
Yset |
the original Y ( |
X.center |
centering parameter for X
(Default: |
X.scale |
scaling parameter for X
(Default: |
Y.center |
centering parameter for Y
(Default: |
Y.scale |
scaling parameter for Y
(Default: |
dimNames |
Names for the
dimensions (i.e., factors) for the
supplementary loadings (Default: |
The computation relies on the SVD of the correlation matrix between X and Y, computed as R = X'Y (where X Y are the original data matrices that have been preprocessed, with, e.g., centering and scaling) and decomposed with the SVD as R = PDQ', with the usual constraints that P'P = Q'Q = I.
The active loadings are P (X-loadings) and Q (Y-loadings). These loadings come from the SVD of matrix R = X'Y = PDQ'.
The loadings of one set can be obtained from the correlation matrix R and the loadings from the dual set. For example:
P = X'YQ inv(D) = RQ inv(D) (with inv(D) being the inverse of D). Eq. 1
Supplementary variable loadings are obtained by first computing
their correlation with their dual set and then projecting these
on the singular vector of their dual set. So, for example,
the loadings denoted Psup for
an N
by K
matrix of
K
supplementary variables considered
as belonging to the X-set will be projected by first computing
the correlation matrix between these variables and
Y (the dual set) as: Rsup = Xsup' Y (note that
we assume here that Xsup has been pre-processed in the same way as
X). The supplementary loadings are now computed
by replacing in Eq.1 X by Xsup to obtain:
Psup = Xsup' * Y * Q * inv(D) = Rsup * Q * inv(D) . Eq.2.
a list with the following elements:
"loadings.sup.X
": The loadings
of the supplementary variables
as originating from the Xset
(needs to
have the dual Yset
to be computed).
"sup.fi
": The singular-value-normalized
loadings of the supplementary variables
as originating from the Xset
(needs to
have the dual Yset
to be computed).
"loadings.sup.Y
": The loadings
of the supplementary variables
as originating from the Yset
(needs to
have the dual Xset
to be computed).
"sup.fj
": The singular-value-normalized
loadings of the supplementary variables
as originating from the Yset
(needs to
have the dual Xset
to be computed).
"cor.lx
": The correlations
between the supplementary variables
and the X set.
"cor.ly
": The correlations
between the supplementary variables
and the Y set.
Hervé Abdi
See:
Abdi, H., & Williams, L.J. (2013). Partial least squares methods: Partial least squares correlation and partial least square regression. In: B. Reisfeld & A. Mayeno (Eds.), Methods in Molecular Biology: Computational Toxicology. New York: Springer Verlag. pp. 549-579.
Abdi, H. (2007). Singular Value Decomposition (SVD) and Generalized Singular Value Decomposition (GSVD). In N.J. Salkind (Ed.): Encyclopedia of Measurement and Statistics. Thousand Oaks (CA): Sage. pp. 907-912.
tepPLS
expo.scale
supplementaryObservations4PLSC
## Not run:
if(interactive()){
#EXAMPLE1
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.