PLS_Toolbox Documentation: pcapro | < pcaengine | pcolormap > |
pcapro
Purpose
Project new data onto an existing principal components model.
Synopsis
[scoresn,resn,tsqn] = pcapro(newdata,loads,ssq,reslm,tsqlm,plots)
[scoresn,resn,tsqn] = pcapro(newdata,pcamod,plots)
Description
Inputs can be in two forms: 1) as a list of input variables, or 2) as a single model structure variable returned by ANALYSIS or PCA.
1) If a list of input variables is used the inputs are the new data newdata scaled the same as the original data used to construct the model, the model loadings loads, the model variance info ssq, the limit for Q reslm, the limit for T2 tsqlm, and an optional variable plots which suppresses plotting when set to 0 {default plots = 1}.
WARNING: Scaling for newdata should be the same as original data used to create the PCA model!
The I/O format is:
[scoresn,resn,tsqn] = pcapro(newdata,loads,ssq,q,tsq,plots)
2) If the PCA model is input as the single model structure variable returned by ANALYSIS or PCA then the inputs are the new data newdata in the units of the original data, the structure variable that contains the PCA model pcamod, and an optional variable plots which suppresses the plots when set to 0 {default plots = 1}.
NOTE: newdata will be preprocessed in PCAPRO using information stored in pcamod (pcamod.detail.preprocessing).
The I/O format is:
[scoresn,resn,tsqn] = pcapro(newdata,pcamod,plots)
Outputs are the new scores scoresn, residuals resn, and T2 values tsqn. These are plotted if plots = 1 {default}.
See Also
analysis, datahat, modlpred, pca, simca, tsqmtx
< pcaengine | pcolormap > |