covsel | R Documentation |
CovSel: Variable selection for highly multivariate and multi-response calibration (Roger et al. 2011).
The function can give a priori weights to the observations with argument weights
(not in the original article).
covsel(X, Y, nvar = NULL, scaly = TRUE, weights = NULL)
X |
A |
Y |
A |
nvar |
The number of variables to select in |
scaly |
If |
weights |
A vector of length |
sel |
A data.frame where variable |
weights |
The weights used for the row observations. |
Roger, J.M., Palagos, B., Bertrand, D., Fernandez-Ahumada, E., 2011. CovSel: Variable selection for highly multivariate and multi-response calibration: Application to IR spectroscopy. Chem. Lab. Int. Syst. 106, 216-223.
n <- 6 ; p <- 4
set.seed(1)
X <- matrix(rnorm(n * p, mean = 10), ncol = p, byrow = TRUE)
Y <- matrix(rnorm(n * 2, mean = 10), ncol = 2, byrow = TRUE)
set.seed(NULL)
X
Y
covsel(X, Y, nvar = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.