Learn R Programming

plspm (version 0.2-2)

plsreg1: PLS-R1: Partial Least Squares Regression 1

Description

Calculates partial least squares regression for the univariate case (i.e. one response variable)

Usage

plsreg1(x, y, nc = 2, cv = FALSE)

Arguments

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).

Value

  • An object of class "plsreg1", basically a list with the following elements:
  • scoresPLS components.
  • x.loadsloadings of the predictor variables.
  • y.loadsloadings of the predictand variable.
  • u.scoresu scores of the predictand variable.
  • raw.wgsweights to calculate the PLS scores with the deflated matrices of predictor variables.
  • mod.wgsmodified weights to calculate the PLS scores with the matrix of predictor variables.
  • std.coefVector of standardized regression coefficients.
  • coeffsVector of regression coefficients (used with the original data scale).
  • R2Vector of PLS R-squared.
  • y.predVector of predicted values.
  • residVector of residuals.
  • cor.scoCorrelations between the variables and the PLS components.
  • T2Table of Hotelling T2 values (used to detect atypical observations).
  • Q2Table with the cross validation results. Includes: PRESS, RSS, Q2, and cummulated Q2. Only available when cv=TRUE

Details

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.

References

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.

See Also

print.plsreg1, plot.plsreg1, plsreg2.

Examples

Run this code
## 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)

Run the code above in your browser using DataLab