opls_for_projection: orthogonal scores algorithn of partial leat squares (opls)...

Description Usage Arguments Value Author(s)

View source: R/RcppExports.R

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

1
2
3
4
opls_for_projection(X, Y, ncomp, scale,
                    maxiter, tol,
                    pcSelmethod = "var",
                    pcSelvalue = 0.01)

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.

pcSelmethod

if regression = TRUE, the method for selecting the number of components. Options are: 'manual', 'cumvar' (for selecting the number of principal components based on a given cumulative amount of explained variance) and 'var' (for selecting the number of principal components based on a given amount of explained variance). Default is 'cumvar'.

pcSelvalue

a numerical value that complements the selected method (pcSelmethod). If 'cumvar' is chosen (default), pcSelvalue must be a value (larger than 0 and below 1) indicating the maximum amount of cumulative variance that the retained components should explain. Default is 0.99. If 'var' is chosen, pcSelvalue must be a value (larger than 0 and below 1) indicating that components that explain (individually) a variance lower than this threshold must be excluded. If 'manual' is chosen, pcSelvalue has no effect and the number of components retrieved are the one specified in ncomp.

Value

a list containing the following elements:

Author(s)

Leonardo Ramirez-Lopez


resemble documentation built on Nov. 9, 2020, 5:08 p.m.