Tconcalc: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Jeremy
No edit summary
imported>Donal
Line 1: Line 1:
===Purpose===
===Purpose===


Calculate Hotelling's T<sup>2</sup> contributions for predictions on a model.
Calculate Hotelling's T<sup>2</sup> contributions for predictions on orthogonal models.
If the input (model) is a PCA model structure then p = model.loads{2} and the output contributions (tcon) and T<sup>2</sup> (tsqs) are calculated for a row vector x [e.g., a row of input (newx)] as
 
    tcon = x*p*sqrt(inv(s))*p';
    tsqs = tcon*tcon';


===Synopsis===
===Synopsis===

Revision as of 10:28, 6 March 2013

Purpose

Calculate Hotelling's T2 contributions for predictions on orthogonal models. If the input (model) is a PCA model structure then p = model.loads{2} and the output contributions (tcon) and T2 (tsqs) are calculated for a row vector x [e.g., a row of input (newx)] as

    tcon = x*p*sqrt(inv(s))*p';
    tsqs = tcon*tcon';

Synopsis

tcon = tconcalc(newx,model)
tcon = tconcalc(pred,model)
tcon = tconcalc(model)

Description

Inputs are the new data newx and the 2-way PCA or regression model for which T2 contributions should be calculated model. Alternatively, the prediction structure pred calculated with new data can be used in place of the new data itself or both can be omitted (passing model only) to get T2 contributions for the calibration data.

See Also

datahat, pca, pcr, pls, qconcalc