Tsqmtx: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Jeremy
(Importing text file)
imported>Scott
 
Line 37: Line 37:
===See Also===
===See Also===


[[datahat]], [[pca]], [[pcr]], [[pls]]
[[datahat]], [[pca]], [[pcr]], [[pls]], [[tsqqmtx]]

Latest revision as of 16:04, 21 September 2011

Purpose

Calculates the Hotelling's T2 contributions for PCA.

Synopsis

[tsqmat,tsqs] = tsqmtx(x,model)
[tsqmat,tsqs] = tsqmtx(x,p,ssq)

Description

TSQMTX calculates the Hotelling's T2 contributions for PCA.

Inputs

  • x = data matrix (class "double" or "dataset), and
  • model = model structure returned from ANALYSIS or PCA, or
  • p = PCA loadings, and
  • ssq = variance captured table.

If a PCA model structure model is input, the loadings and variance captured table are extracted from the model. Additionally, the preprocessing from the model is applied to the data prior to estimating the scores. However, if the loadings p and variance captured table ssq are passed as inputs then the data must be preprocessed in a manner similar to the data used to calibrate the PCA model.

Outputs

  • tsqmat = indivual variable contributions to Hotelling's T2, and
  • tsqs = Hotelling's T2 for each sample.

ALGORITHM

If P is the loadings matrix and T is the scores matrix from the calibration data that had M samples, then S is a diagonal matrix defined as S = TTT/(M-1). For a new sample xnew (row vector that has been appropriately scaled) the T2 contribution tcon is calculated as tcon = xnewPS-1/2PT.

See Also

datahat, pca, pcr, pls, tsqqmtx