Pcapro: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Chuck
imported>Chuck
Line 24: Line 24:
:* '''reslm''' = the limit for Q residuals
:* '''reslm''' = the limit for Q residuals
:* '''tsqlm''' = the limit for T<sup>2</sup>  
:* '''tsqlm''' = the limit for T<sup>2</sup>  
:* '''plots''' = optional variable, which suppresses plotting when set to 0 {default ''plots'' ? 1}.
:* '''plots''' = optional variable, 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!
WARNING: Scaling for '''newdata''' should be the same as original data used to create the PCA model!
Line 31: Line 31:
:* '''newdata''' = data to be applied to the existing PCA model,in the units of the original data
:* '''newdata''' = data to be applied to the existing PCA model,in the units of the original data
:* '''pcamod''' = the structure variable that contains the PCA model
:* '''pcamod''' = the structure variable that contains the PCA model
:* '''plots''' = optional variable, which suppresses the plots when set to 0 {default ''plots'' ???}.
:* '''plots''' = optional variable, 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).
NOTE: ''newdata'' will be preprocessed in PCAPRO using information stored in pcamod (pcamod.detail.preprocessing).

Revision as of 14:49, 8 October 2008

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

This function applies a previously-determined PCA model to a set of new data newdata. The PCA model can be input in one of two possible forms: 1) as a list of input variables, or 2) as a single model structure variable that had been previously returned by analysis or pca.

Inputs

  • newdata = data to be applied to the existing PCA model
  • The PCA model, which can be inputs in one of two forms, 1) as a list of input variables or 2) as a single model structure variable. These two cases are summarized below:
1) list of input variables:
  • newdata = data to be applied to the existing PCA model, scaled the same as the original data used to construct the model
  • loads = the model loadings
  • ssq = the model variance information
  • reslm = the limit for Q residuals
  • tsqlm = the limit for T2
  • plots = optional variable, 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!

2) single model structure:
  • newdata = data to be applied to the existing PCA model,in the units of the original data
  • pcamod = the structure variable that contains the PCA model
  • plots = optional variable, 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).

Outputs

  • scoressn = the new scores
  • resn = new residuals
  • tsqn = new T2 values

See Also

datahat, analysis, explode, modlpred, pca, simca, tsqmtx