Modlpred
Purpose
Predictions based on models created by ANALYSIS.
Synopsis
- [yprdn,resn,tsqn,scoresn] = modlpred(newx,modl,plots)
- [yprdn,resn,scoresn] = modlpred(newx,bin,p,q,w,lv,plots);
Description
MODLPRED makes Y-block predictions based on an X-block and an existing regression model created using ANALYSIS.
Inputs are the new X-block data newx in the units of the original data, the structure variable that contains the regression model modl, and an optional variable plots which suppresses the plots when set to 0 {default = 1}.
Outputs are the Y-block predictions yprdn, residuals resn, T2 values tsqn, and scores scoresn.
MODLPRED can also make predictions based on an existing PLS model constructed with the NIPALS algorithm from the PLS function. Inputs are the matrix of predictor variables newx, the PLS model inner-relation coefficients bin, the x-block loadings p, the y-block loadings q, the x-block weights w, the number of latent variables to use in prediction lv, and an optional variable plots which suppresses the plots when set to 0 {default = 1}.
Outputs are the Y-block predictions yprdn, residuals resn, and the scores scoresn. Note that T2 are not calculated.