pls2_nipals: PLS2 by NIPALS

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/pls2_nipals.R

Description

NIPALS algorithm for PLS2 regression (y is multivariate)

Usage

1
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

Details

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

Value

P

matrix with loadings for X

T

matrix with scores for X

Q

matrix with loadings for Y

U

matrix with scores for Y

D

D-matrix within the algorithm

W

weights for X

C

weights for Y

B

final regression coefficients

Author(s)

Peter Filzmoser <[email protected]>

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

1
2
data(cereal)
res <- pls2_nipals(cereal$X,cereal$Y,a=5)

Example output

Loading required package: rpart

WARNING! Iteration stop in h= 2  without convergence!


WARNING! Iteration stop in h= 3  without convergence!


WARNING! Iteration stop in h= 4  without convergence!


WARNING! Iteration stop in h= 5  without convergence!

chemometrics documentation built on May 29, 2017, 10:42 a.m.