Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


resemble (version 1.2.2)

projectpls: Projection function for the opls function

Description

Projects new spectra onto a PLS space based on a model generated by either by opls or the opls2 functions. For internal use only!.

Usage

projectpls(projectionm, ncomp, newdata, scale, Xcenter, Xscale)

Arguments

projectionm
the projection matrix generated by the opls function.
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.
Xcenter
a matrix of one row with the values that must be used for centering newdata.
Xscale
if scale = TRUE a matrix of one row with the values that must be used for scaling newdata.

Value

a matrix corresponding to the new spectra projected onto the PLS space