plsreg1 {plspm} | R Documentation |
Calculates partial least squares regression for the univariate case (i.e. one response variable)
plsreg1(x, y, nc = 2, cv = FALSE)
x |
A numeric matrix or data frame with the predictor variables (which may contain missing data). |
y |
A numeric vector for the reponse or predictand variable. |
nc |
The number of extracted PLS components (2 by default). |
cv |
A logical value indicating whether cross-validation should be performed (FALSE by default). |
The minimum number of PLS components nc
to be extracted is 2.
The argument x
may contain missing data. Conversely, the argument y
must not contain missing values.
The data is scaled to standardized values (mean=0, variance=1).
The argument cv
gives the option to perform leave-one-out cross validation to choose the best number of PLS components.
An object of class "plsreg1"
, basically a list with the following elements:
scores |
PLS components. |
x.loads |
loadings of the predictor variables. |
y.loads |
loadings of the predictand variable. |
u.scores |
u scores of the predictand variable. |
raw.wgs |
weights to calculate the PLS scores with the deflated matrices of predictor variables. |
mod.wgs |
modified weights to calculate the PLS scores with the matrix of predictor variables. |
std.coef |
Vector of standardized regression coefficients. |
coeffs |
Vector of regression coefficients (used with the original data scale). |
R2 |
Vector of PLS R-squared. |
y.pred |
Vector of predicted values. |
resid |
Vector of residuals. |
cor.sco |
Correlations between the variables and the PLS components. |
T2 |
Table of Hotelling T2 values (used to detect atypical observations). |
Q2 |
Table with the cross validation results. Includes: PRESS, RSS, Q2, and cummulated Q2. Only available when cv=TRUE |
Gaston Sanchez
Geladi, P., and Kowalski, B. (1986) Partial Least Squares Regression: A Tutorial. Analytica Chimica Acta, 185, pp. 1-17.
Tenenhaus, M. (1998) La Regression PLS. Theorie et Pratique. Editions TECHNIP, Paris.
Tenenhaus, M., Gauchi, J.-P., and Menardo, C. (1995) Regression PLS et applications. Revue de statistique appliquee, 43, pp. 7-63.
Valencia, J.L., Diaz-Llanos, F.J. (2004) Metodos de Prediccion en Situaciones Limite. Editorial La Muralla, S.A. Madrid.
print.plsreg1
, plot.plsreg1
, plsreg2
.
## Not run: ## example of PLSR1 with the vehicles dataset ## predictand variable: price of vehicles data(vehicles) pls1 <- plsreg1(vehicles[,1:12], vehicles[,13], cv=TRUE) pls1 plot(pls1) ## End(Not run)