Datahat

From Eigenvector Research Documentation Wiki
Revision as of 08:43, 21 September 2011 by imported>Scott (→‎See Also)
Jump to navigation Jump to search

Purpose

Calculates the model estimate and residuals of the data.

Synopsis

xhat = datahat(model);
[xhat,resids] = datahat(model,data);

Description

Given a standard model structure (model), DATAHAT computes the model estimate of the data (xhat). For example, if (model) is a PCA model of a matrix Xcal such that Xcal = TPT + E, then Xhat = TPT i.e., Xcal = TPT + E = Xhat + E).


If optional input (data) is supplied then DATAHAT computes the model estimate of (data) that is output in (xhat). For the PCA model of matrix Xcal, and (data) is a data matrix Xnew then Xhat = XnewPPT = TnewPT. The output (resids) is a matrix with the corresponding residuals E = Xnew-XnewPPT = Xnew(I-PPT). If (data) is Xcal then Xhat = TPT and resids is E = Xcal(I-PPT).


Note that preprocessing in (model) will be performed before the residuals are calculated. If data is not provided, only (xhat) of the calibration data is available.

Note that DATAHAT works with almost all standard model structures.

See Also

analysis, npls, parafac, parafac2, qconcalc, residuallimit, tconcalc, tsqmtx, tsqqmtx, tucker, varcap, varcapy