opls_for_projection {resemble} | R Documentation |
orthogonal scores algorithn of partial leat squares (opls) projection
Description
Computes orthogonal socres partial least squares (opls) projection with the NIPALS algorithm. It allows multiple response variables. Although the main use of the function is for projection, it also retrieves regression coefficients. NOTE: For internal use only!
Usage
opls_for_projection(X, Y, ncomp, scale,
maxiter, tol,
pcSelmethod = "var",
pcSelvalue = 0.01,
algorithm = "pls",
xls_min_w = 3,
xls_max_w = 15)
Arguments
X |
a matrix of predictor variables. |
Y |
a matrix of either a single or multiple response variables. |
ncomp |
the number of pls components. |
scale |
logical indicating whether |
maxiter |
maximum number of iterations. |
tol |
limit for convergence of the algorithm in the nipals algorithm. |
pcSelmethod |
if |
pcSelvalue |
a numerical value that complements the selected method
( |
algorithm |
(for weights computation) a character string indicating
what method to use. Options are:
|
xls_min_w |
(for weights computation) an integer indicating the minimum window size for the "xls"
method. Only used if |
xls_max_w |
(for weights computation) an integer indicating the maximum window size for the "xls"
method. Only used if |
Value
a list containing the following elements:
coefficients
: the matrix of regression coefficients.bo
: a matrix of one row containing the intercepts for each component.scores
: the matrix of scores.X_loadings
: the matrix of X loadings.Y_loadings
: the matrix of Y loadings.projection_mat
: the projection matrix.Y
: theY
input.variance
: alist
conating two objects:x_var
andy_var
. These objects contain information on the explained variance for theX
andY
matrices respectively.transf
: alist
conating two objects:Xcenter
andXscale
.weights
: the matrix of wheights.
Author(s)
Leonardo Ramirez-Lopez