Learn R Programming

chemometrics (version 0.5)

pls2_nipals: PLS2 by NIPALS

Description

NIPALS algorithm for PLS2 regression (y is multivariate)

Usage

pls2_nipals(X, Y, a, it = 50, tol = 1e-08, scale = FALSE)

Arguments

X
original X data matrix
Y
original Y-data matrix
a
number of PLS components
it
number of iterations
tol
tolerance for convergence
scale
if TRUE the X and y data will be scaled in addition to centering, if FALSE only mean centering is performed

Value

  • Pmatrix with loadings for X
  • Tmatrix with scores for X
  • Qmatrix with loadings for Y
  • Umatrix with scores for Y
  • DD-matrix within the algorithm
  • Wweights for X
  • Cweights for Y
  • Bfinal regression coefficients

Details

The NIPALS algorithm is the originally proposed algorithm for PLS. Here, the Y-data matrix is multivariate.

References

K. Varmuza and P. Filzmoser: Introduction to Multivariate Statistical Analysis in Chemometrics. CRC Press, Boca Raton, FL, 2009.

See Also

mvr, pls1_nipals

Examples

Run this code
data(cereal)
res <- pls2_nipals(cereal$X,cereal$Y,a=5)

Run the code above in your browser using DataLab