data(Penta)
mod1 <- plsFit(log.RAI ~., scale = TRUE, data = Penta[, -1],
ncomp = 2, validation = "loo")
sr(mod1)
plot(sr(mod1))
if (FALSE) {
mod2 <- plsFit(Sepal.Length ~., scale = TRUE, data = iris,
method = "wrtpls", validation = "none") #ncomp is ignored
plot(sr(mod2, ncomps = 2))
}
Run the code above in your browser using DataLab