Description Slots Objects from the Class Author(s) See Also Examples
An S4 class to store PCA and (O)PLS(-DA) models: Objects can be created by calls of the form
new("opls", ...) or by calling the opls function
typeCcharacter: model type (PCA, PLS, PLS-DA, OPLS, or OPLS-DA)
descriptionMCcharacter matrix: Description of the data set (number of samples, variables, etc.)
modelDFdata frame with the model overview (number of components, R2X, R2X(cum), R2Y, R2Y(cum), Q2, Q2(cum), significance, iterations)
summaryDFdata frame with the model summary (cumulated R2X, R2Y and Q2); RMSEE is the square root of the mean error between the actual and the predicted responses
subsetViInteger vector: Indices of observations in the training data set
pcaVarVnPCA: Numerical vector of variances of length: predI
vipVnPLS(-DA): Numerical vector of Variable Importance in Projection; OPLS(-DA): Numerical vector of Variable Importance for Prediction (VIP4,p from Galindo-Prieto et al, 2014)
orthoVipVnOPLS(-DA): Numerical vector of Variable Importance for Orthogonal Modeling (VIP4,o from Galindo-Prieto et al, 2014)
coefficientMN(O)PLS(-DA): Numerical matrix of regression coefficients (B; dimensions: ncol(x) x number of responses; B = W*C' and Y = XB + F
xMeanVnNumerical vector: variable means of the 'x' matrix
xSdVnNumerical vector: variable standard deviations of the 'x' matrix
yMeanVn(O)PLS: Numerical vector: variable means of the 'y' response (transformed into a dummy matrix in case it is of 'character' mode initially)
ySdVn(O)PLS: Numerical vector: variable standard deviations of the 'y' response (transformed into a dummy matrix in case it is of 'character' mode initially)
xZeroVarViNumerical vector: indices of variables with variance < 2.22e-16 which were excluded from 'x' before building the model
scoreMNNumerical matrix of x scores (T; dimensions: nrow(x) x predI) X = TP' + E; Y = TC' + F
loadingMNNumerical matrix of x loadings (P; dimensions: ncol(x) x predI) X = TP' + E
weightMN(O)PLS: Numerical matrix of x weights (W; same dimensions as loadingMN)
orthoScoreMNOPLS: Numerical matrix of orthogonal scores (Tortho; dimensions: nrow(x) x number of orthogonal components)
orthoLoadingMNOPLS: Numerical matrix of orthogonal loadings (Portho; dimensions: ncol(x) x number of orthogonal components)
orthoWeightMNOPLS: Numerical matrix of orthogonal weights (same dimensions as orthoLoadingMN)
cMN(O)PLS: Numerical matrix of Y weights (C); dimensions: number of responses or number of classes in case of qualitative response with more than 2 classes x number of predictive components; Y = TC' + F
coMN(O)PLS: Numerical matrix of Y orthogonal weights; dimensions: number of responses or number of classes in case of qualitative response with more than 2 classes x number of orthogonal components
uMN(O)PLS: Numerical matrix of Y scores (U; same dimensions as scoreMN); Y = UC' + G
weightStarMNNumerical matrix of projections (W*; same dimensions as loadingMN); whereas columns of weightMN are derived from successively deflated matrices, columns of weightStarMN relate to the original 'x' matrix: T = XW*; W*=W(P'W)inv
suppLsList of additional objects to be used internally by the 'print', 'plot', and 'predict' methods
esetExpressionSet: when 'opls' has been applied to an ExpressionSet, the instance with additional columns in pData containing the scores and predictions, and in fData containing the loadings, VIP, coefficients is stored here
Objects can be created by calls of the form
new("opls", ...) or by calling the opls function
Etienne Thevenot, etienne.thevenot@cea.fr
Etienne Thevenot, etienne.thevenot@cea.fr
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | #### PCA
data(foods) ## see Eriksson et al. (2001); presence of 3 missing values (NA)
head(foods)
foodMN <- as.matrix(foods[, colnames(foods) != "Country"])
rownames(foodMN) <- foods[, "Country"]
head(foodMN)
foo.pca <- opls(foodMN)
#### PLS with a single response
data(cornell) ## see Tenenhaus, 1998
head(cornell)
cornell.pls <- opls(as.matrix(cornell[, grep("x", colnames(cornell))]),
cornell[, "y"])
## Complementary graphics
plot(cornell.pls, typeVc = c("outlier", "predict-train", "xy-score", "xy-weight"))
#### PLS with multiple (quantitative) responses
data(lowarp) ## see Eriksson et al. (2001); presence of NAs
head(lowarp)
lowarp.pls <- opls(as.matrix(lowarp[, c("glas", "crtp", "mica", "amtp")]),
as.matrix(lowarp[, grepl("^wrp", colnames(lowarp)) |
grepl("^st", colnames(lowarp))]))
#### PLS-DA
data(sacurine)
attach(sacurine)
sacurine.plsda <- opls(dataMatrix, sampleMetadata[, "gender"])
#### OPLS-DA
sacurine.oplsda <- opls(dataMatrix, sampleMetadata[, "gender"], predI = 1, orthoI = NA)
detach(sacurine)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.