data(gasoline, package = "pls")
library(pls)
pls <- plsr(octane ~ NIR, ncomp = 10, validation = "LOO", data = gasoline)
comp <- which.min(pls$validation$PRESS)
X <- unclass(gasoline$NIR)
vip <- VIP(pls, comp)
sr <- SR (pls, comp, X)
smc <- sMC(pls, comp, X)
lw <- LW (pls, comp)
rc <- RC (pls, comp)
urc <- URC(pls, comp)
frc <- FRC(pls, comp)
mrm <- mRMR(pls, 401, X)$score
matplot(scale(cbind(vip, sr, smc, lw, rc, urc, frc, mrm)), type = 'l')
Run the code above in your browser using DataLab