PLSR_SVD: PLS regression (PLSR) using the Singular Value Decomposition...

View source: R/PLS_jack_svds_HA.R

PLSR_SVDR Documentation

PLS regression (PLSR) using the Singular Value Decomposition instead of the original NIPALS

Description

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).

Usage

PLSR_SVD(X, Y, nfactor, inference = TRUE, displayJack = TRUE)

Arguments

X

The N observations by I variables matrix (X) of the predictors.

Y

The N observations by J variables matrix (Y) to be predicted.

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 TRUE (default) run the jackknife based inference battery. Note that this step can be very time consuming for large data sets.

displayJack

if TRUE (default) display the current iteration when performing jackknife, worth setting it to FALSE for large data sets because it is quite time consuming.

Details

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

Value

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 = ∑_{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 = ∑_{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.

.

Author(s)

Hervé Abdi, Lei Xuan

References

(see also https://personal.utdallas.edu/~herve/)

  1. Abdi, H. (2010). Partial least square regression, projection on latent structure regression, PLS-Regression. Wiley Interdisciplinary Reviews: Computational Statistics, 2, 97-106.

  2. 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.

  3. 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.

See Also

PLS4jack corrcoef4mat normaliz

Examples

## 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)

HerveAbdi/data4PCCAR documentation built on Sept. 11, 2022, 4:19 p.m.