View source: R/PLS_jack_svds_HA.R
PLSR_SVD | R Documentation |
PLSR_SVD
:
PLS regression (PLSR)
computed using the Singular
Value Decomposition (SVD)
instead of the original NIPALS
.
(faster for large data sets).
This version is an R
version of the original MATLAB
code used in Abdi (2010).
PLSR_SVD(X, Y, nfactor, inference = TRUE, displayJack = TRUE)
X |
The |
Y |
The |
nfactor |
Number of factors (a.k.a., latent variables) to be used for the prediction. Note that the solution in PLSR is strongly dependent upon the number of factors to keep. |
inference |
when |
displayJack |
if |
GOAL:
Compute the PLS regression coefficients/decomposition
Zx = T * P'.
Zy = T * B * C' = Zx * Bpls
with
Zx
and Zy being matrices
storing the Z
-scores version of
X and Y.
B = diag(b)
Y = X * Bpls_star
with X being augmented with a column of ones and Y and X being measured in their original units
In addition we have:
Yjack: the jackknifed (LOO) random effect estimation of Y.
Also we have the following relationships:
T'* T = I (NB normalization <> from SAS)
W'* W = I
C is unit normalized
U and P are not normalized.
Xhat,Yhat: reconstituted matrices from PLSR
For notations: see Abdi (2003, 2007, 2010),
available from personal.utdallas.edu/~herve
A (long) list with results
for the fixed and random effects (if
inference = TRUE
)
Fixed effects results:
Xhat: reconstituted X
matrix from PLSR
(with nfact
latent variables:
fixed effect).
Yhat: reconstituted Y
matrix from PLSR
(with nfact
latent variables:
fixed effect).
Yjack: reconstituted Y
from jackknife
(with nfact
latent variables:
fixed effect).
R2x, R2y: Proportion of variance of X, Y explained by each latent variable.
RESSy: the residual
sum of squares:
RESSy =
\sum_{i,k} (y_{i,k} - \hat{y}_{i.k})^2
Yhat4Ress :
array of the nfactor
Y
(fixed effect)
matrices used to compute RESS
.
If
inference = TRUE
,
these random effect results are also returned:
PRESSy: the PREDICTED
residual sum of squares:
RESSy
= \sum_{i,k} (y_{i,k}
- \hat{y}_{-(i.k)})^2
where \hat{y}_{-(i.k)}
is the value obtained
without including y_{i,j}
in the analysis
Q2: Values of the Q^2
parameter
Q^2 = 1 - PRESSy(n)/(RESSy(n-1))
Q2
is used to choose the number
of latent variables to keep with the rule:
keep latent variable
n
if Q2_n
> some limit.
Rule of thumb: limit =.05 for
number of observations < 100, 0 otherwise
r2y_random, rv_random:
Vector of R^2
and R_V
coefficients
between Y and Yjack
for each number of latent variable solutions.
Yhat4Press:
array of the nfactor
Y
Jackknifed matrices
used to compute PRESS
.
.
Hervé Abdi, Lei Xuan
(see also https://personal.utdallas.edu/~herve/
)
Abdi, H. (2010). Partial least square regression, projection on latent structure regression, PLS-Regression. Wiley Interdisciplinary Reviews: Computational Statistics, 2, 97-106.
Abdi, H. (2007). Partial least square regression (PLS regression). In N.J. Salkind (Ed.): Encyclopedia of Measurement and Statistics. Thousand Oaks (CA): Sage. pp. 740-744.
Abdi. H. (2003). Partial least squares regression (PLS-regression). In M. Lewis-Beck, A. Bryman, T. Futing (Eds): Encyclopedia for Research Methods for the Social Sciences. Thousand Oaks (CA): Sage. pp. 792-795.
PLS4jack
corrcoef4mat
normaliz
## Not run:
# Run the wine example from Abdi (2010)
data("fiveWines4Rotation")
Xmat <- fiveWines4Rotation$Xmat.Chemistry
Ymat <- fiveWines4Rotation$Ymat.Sensory
resPLSR <- PLSR_SVD(Xmat, Ymat, 3)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.