Learn R Programming

o2plsda (version 0.0.25)

o2pls: fit O2PLS model with best nc, nx, ny

Description

fit O2PLS model with best nc, nx, ny

Usage

o2pls(X, Y, nc, nx, ny, scale = FALSE, center = FALSE)

Value

An object containing

Xscore

Joint \(X\) scores

Xloading

Joint \(X\) loadings

Yscore

Joint \(Y\) scores

Yloading

Joint \(Y\) loadings

TYosc

Orthogonal \(X\) scores

PYosc

Orthogonal \(X\) loadings

WYosc

Orthogonal \(X\) weights

UXosc

Orthogonal \(Y\) scores

PXosc

Orthogonal \(Y\) loadings

CXosc

Orthogonal \(Y\) weights

BU

Regression coefficient in Tt ~ U

BT

Regression coefficient in U ~ Tt

Xhat

Prediction of \(X\) with \(Y\)

Yhat

Prediction of \(Y\) with \(X\)

R2Xhat

Variation of the predicted \(X\) as proportion of variation in \(X\)

R2Yhat

Variation of the predicted \(Y\) as proportion of variation in \(Y\)

R2X

Variation of the modeled part in \(X\) (defined by Joint + Orthogonal variation) as proportion of total variation in \(X\)

R2Y

Variation of the modeled part in \(Y\) (defined by Joint + Orthogonal variation) as proportion of total variation in \(Y\)

R2Xcorr

Variation of the joint part in \(X\)

R2Ycorr

Variation of the joint part in \(Y\)

R2Xo

Variation of the orthogonal part in \(X\) as proportion of variation in \(X\)

R2Yo

Variation of the orthogonal part in \(Y\) as proportion of variation in \(Y\)

R2Xp

Variation in \(X\) joint part predicted by \(Y\) Joint part

R2Yp

Variation in \(Y\) joint part predicted by \(X\) Joint part

varXj

Variation in each Latent Variable (LV) in \(X\) Joint part

varYj

Variation in each Latent Variable (LV) in \(Y\) Joint part

varXorth

Variation in each Latent Variable (LV) in \(X\) Orthogonal part

varYorth

Variation in each Latent Variable (LV) in \(Y\) Orthogonal part

Exy

Residuals in \(X\)

Fxy

Residuals in \(Y\)

Arguments

X

a Numeric matrix (input)

Y

a Numeric matrix (input)

nc

Integer. Number of joint PLS components.

nx

Integer. Number of orthogonal components in X

ny

Integer. Number of orthogonal components in Y

scale

boolean values determining if data should be scaled or not

center

boolean values determining if data should be centered or not

Author

Kai Guo

Examples

Run this code
set.seed(123)
X = matrix(rnorm(500),50,10)
Y = matrix(rnorm(500),50,10)
X = scale(X, scale = TRUE)
Y = scale(Y, scale = TRUE)
fit <- o2pls(X, Y, 1, 2, 2)
summary(fit)

Run the code above in your browser using DataLab