predict.mvr {pls.pcr} | R Documentation |
Prediction for MVR (PCR, PLS) models. New responses are predicted using a previously defined model and a new matrix of independent observations.
predict.mvr(object, newX, nlv, ...)
object |
a MVR model |
newX |
a matrix of new independent observations |
nlv |
the number of latent variables (optional) |
... |
not used currently. |
Predicted values are returned.
data(NIR) attach(NIR) nir.mvr <- mvr(Xtrain, Ytrain, 2) nir.predictions <- predict(nir.mvr, Xtest)