tripls: Trilinear Partial Least Squares Regression

Description Usage Arguments Details Value Author(s) References Examples

Description

This function computes trilinear partial least squares (Tri-PLS) regression estimates

Usage

1
tripls(X, y, A, scaling = TRUE, nnames = NULL, pnames = NULL, qnames = NULL)

Arguments

X

The X data as a 3 way (n x p x q) array.

y

The corresponding y data as an n x 1 vector or a length n numeric

A

The number of latent components to estimate (integer)

scaling

Logical flag. If TRUE, the data are internally centered and scaled to unit variance. If FALSE, the data are only centered.

nnames

An optional n x 1 character matrix containing the case names.

pnames

An optional p x 1 character matrix containing p mode variable names.

qnames

An optional q x 1 character matrix containing q mode variable names.

Details

The actual algorithm is described in Reference [4], which is a minor modification of the implementations described in references [1-3].

Value

Returns a class "tripls" regression object containing the indivdual Tri-PLS results, i.e.:

coefficients

The vector of regression coeficients (pq x 1)

intercept

The intercept (n x 1)

scores

The latent variables (or scores, n x A)

fitted.values

The fitted responses from an A component model

W

The combined weighting vectors (pq x A)

WJ

The p mode weighting vectors (p x A)

WK

The q mode weighting vectors (q x A)

YMeans

The y mean (length 1 numeric) )

YScales

The y scale (length 1 numeric, 1 if scaling=FALSE)

XMeans

The X columnwise means (length pq numeric)

XScales

The X columnwise scales (length pq numeric, all ones if scaling=FALSE)

X.scaled

The scaled, unfolded predictor matrix (n x pq)

y.scaled

The scaled response (length n numeric)

sev

The percentage of explained covariance

rmsec

The root mean squared error of calibration

inputs

A list object containing the input data

Author(s)

Sven Serneels, BASF Corp.

References

[1] L. Staahle, Aspects of the analysis of three-way data. Chemometrics and Intelligent Laboratory Systems, 7 (1989), 95-100.

[2] R. Bro, Multiway calibration. Multilinear PLS. Journal of Chemometrics, 10 (1996), 47-61.

[3] S. de Jong, Regression coefficients in multilinear PLS. Journal of Chemometrics, 12 (1998) 77-81.

[4] S. Serneels, K. Faber, T. Verdonck, P.J. Van Espen, Case specific prediction intervals for tri-PLS1: The full local linearization. Chemometrics and Intelligent Laboratory Systems, 108 (2011), 93-99.

Examples

1
2
3
4
data(data_3)
res.tripls <- tripls(data_3$X3,data_3$y3,2)
res.tripls <- tripls(data_3$X3,data_3$y3,2,scaling=FALSE)
res.tripls <- tripls(data_3$X3,data_3$y3,1,qnames=paste("B",1:3,sep=""))

SvenSerneels/tripls_r documentation built on May 4, 2019, 6:30 a.m.