covSel: Covariance Selection - CovSel

View source: R/covSel.R

covSelR Documentation

Covariance Selection - CovSel

Description

Sequential selection of variables based on squared covariance with response and intermediate deflation (as in Partial Least Squares).

Usage

covSel(X, Y, nvar)

Arguments

X

matrix of input variables

Y

matrix of response variable(s)

nvar

maximum number of variables

Value

selected

an integer vector of selected variables

scores

a matrix of score vectors

loadings

a matrix of loading vectors

Yloadings

a matrix of Y loadings

References

J.M. Roger, B. Palagos, D. Bertrand, E. Fernandez-Ahumada. CovSel: Variable selection for highly multivariate and multi-response calibration: Application to IR spectroscopy. Chemom Intel Lab Syst. 2011;106(2):216-223. P. Mishra, A brief note on a new faster covariate's selection (fCovSel) algorithm, Journal of Chemometrics 36(5) 2022.

Examples

data(gasoline, package = "pls")
sels <- with(gasoline, covSel(NIR, octane, 5))
matplot(t(gasoline$NIR), type = "l")
abline(v = sels$selected, col = 2)

khliland/plsVarSel documentation built on April 24, 2024, 11:21 a.m.