predopls: Prediction function for the opls and opls2 functions
Description
Predicts response values based on a model generated by either by opls or the opls2 functions.
For internal use only!.
Usage
predopls(bo, b, ncomp, newdata, scale, Xscale)
Arguments
bo
a numeric value indicating the intercept.
b
the matrix of regression coefficients.
ncomp
an integer value indicating how may components must be used in the prediction.
newdata
a matrix containing the predictor variables.
scale
a logical indicating whether the matrix of predictors used to create the regression model was scaled.
Xscale
if scale = TRUE a matrix of one row with the values that must be used for scaling newdata.
Value
a matrix of predicted values.