View source: R/pls.regression.R
| pls.regression | R Documentation | 
Performs Partial Least Squares (PLS) regression using either the NIPALS or SVD algorithm for component extraction.
This is the main user-facing function for computing PLS models. Internally, it delegates to either NIPALS.pls() or SVD.pls().
pls.regression(x, y, n.components = NULL, calc.method = c("SVD", "NIPALS"))
| x | A numeric matrix or data frame of predictor variables (X), with dimensions n × p. | 
| y | A numeric matrix or data frame of response variables (Y), with dimensions n × q. | 
| n.components | Integer specifying the number of latent components (H) to extract. If NULL, defaults to the rank of  | 
| calc.method | Character string indicating the algorithm to use. Must be either  | 
This function provides a unified interface for Partial Least Squares regression. Based on the value of calc.method,
it computes latent variables using either:
"SVD" — A direct method using the singular value decomposition of the cross-covariance matrix (X^\top Y).
"NIPALS" — An iterative method that alternately estimates predictor and response scores until convergence.
The outputs from both methods include scores, weights, loadings, regression coefficients, and explained variance.
A list (from either SVD.pls() or NIPALS.pls()) containing:
Character string ("PLS Regression").
Score matrices for X and Y.
Weight matrices for X and Y.
Loading matrices.
Component-wise regression weights.
Final regression coefficient matrix (rescaled).
Intercept vector (typically zero due to centering).
Variance explained by each component.
Cumulative variance explained.
Abdi, H., & Williams, L. J. (2013). Partial least squares methods: Partial least squares correlation and partial least square regression. Methods in Molecular Biology (Clifton, N.J.), 930, 549–579. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/978-1-62703-059-5_23")}
de Jong, S. (1993). SIMPLS: An alternative approach to partial least squares regression. Chemometrics and Intelligent Laboratory Systems, 18(3), 251–263. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/0169-7439(93)85002-X")}
SVD.pls, NIPALS.pls
## Not run: 
X <- matrix(rnorm(100 * 10), 100, 10)
Y <- matrix(rnorm(100 * 2), 100, 2)
# Using SVD (default)
model1 <- pls.regression(X, Y, n.components = 3)
# Using NIPALS
model2 <- pls.regression(X, Y, n.components = 3, calc.method = "NIPALS")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.