opls_get_all: orthogonal scores algorithn of partial leat squares...

View source: R/RcppExports.R

opls_get_allR Documentation

orthogonal scores algorithn of partial leat squares (opls_get_all)

Description

Computes orthogonal socres partial least squares (opls_get_all) regressions with the NIPALS algorithm. It retrives a comprehensive set of pls outputs (e.g. vip and sensivity radius). It allows multiple response variables. NOTE: For internal use only!

Usage

opls_get_all(X, 
             Y, 
             ncomp, 
             scale, 
             maxiter, 
             tol, 
             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 X must be scaled.

maxiter

maximum number of iterations.

tol

limit for convergence of the algorithm in the nipals algorithm.

algorithm

(for weights computation) a character string indicating what method to use. Options are: 'pls' for pls (using covariance between X and Y), 'mpls' for modified pls (using correlation between X and Y) or 'xls' for extended pls (as implemented in BUCHI NIRWise PLUS software).

xls_min_w

(for weights computation) an integer indicating the minimum window size for the "xls" method. Only used if algorithm = 'xls'. Default is 3 (as in BUCHI NIRWise PLUS software).

xls_max_w

(for weights computation) an integer indicating the maximum window size for the "xls" method. Only used if algorithm = 'xls'. Default is 15 (as in BUCHI NIRWise PLUS software).

Value

a list containing the following elements:

  • ncomp: the number of components used.

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

  • vip: the projection matrix.

  • selectivity_ratio: the matrix of selectivity ratio (see Rajalahti, Tarja, et al. 2009).

  • Y: the Y input.

  • variance: a list conating two objects: x_var and y_var. These objects contain information on the explained variance for the X and Y matrices respectively.

  • transf: a list conating two objects: Xcenter and Xscale.

  • weights: the matrix of wheights.

Author(s)

Leonardo Ramirez-Lopez


resemble documentation built on May 29, 2024, 8:49 a.m.