Tconcalc

From Eigenvector Research Documentation Wiki
Revision as of 10:30, 6 March 2013 by imported>Donal (→‎Synopsis)
Jump to navigation Jump to search

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,tsqs] = tconcalc(newx,model)
[tcon,tsqs] = tconcalc(pred,model)
[tcon,tsqs] = tconcalc(model)
[tcon,tsqs] = tconcalc(newx,p,ssq)

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