String x and Tsqqmtx: Difference between pages

From Eigenvector Research Documentation Wiki
(Difference between pages)
Jump to navigation Jump to search
imported>Jeremy
(New page: ===Purpose=== Add backslash before troublesome TeX characters. ===Synopsis=== :safestring = string_x(string); ===Description=== The TeX interpreter is used on various text objects in fi...)
 
imported>Jeremy
No edit summary
 
Line 1: Line 1:
===Purpose===
===Purpose===
Add backslash before troublesome TeX characters.
 
Calculates matrix for T^2+Q contributions for PCA and MPCA.


===Synopsis===
===Synopsis===
:safestring = string_x(string);
 
:[tsqqmat,tsqqs] = tsqqmtx(x,model,wt)


===Description===
===Description===


The TeX interpreter is used on various text objects in figures to add subscripts, superscripts and other special effects to text. These effects are triggered by special characters in strings. string_x "escapes" these special characters to keep them from being handled by the TeX interpreter.  An escaping backslash is added before each of these characters: _ ^ { }
====Inputs====
* '''x''' = data matrix [class double or dataset]
* '''model''' = PCA or MPCA model standard model struture (see PCA).
====Optional Inputs====
* '''wt''' = {sqrt((M-K-1)/(M-1))}, 0<=wt<=1 scalar weighting for contributions 0<wt<1 gives combined T^2 and Q statistics where M is the number of calibration samples and K is the number of PCs.
::wt = 1 gives T^2 and T^2 contributions
::wt = 0 gives standarized Q residuals
   
   
====Inputs====
* '''string''' = a string to clean
====Outputs====
====Outputs====
* '''safestring''' = the backslashed string
* '''tsqqs''' = combined Hotelling's T^2 + Q residual
* '''tsqqmat''' = matrix of individual variable contributions such that
::<tt>tsqqs(i) = tsqqmat(i,:)*tsqqmat(i,:)';</tt>
 
===See Also===


===See Also===
[[datahat]], [[pca]], [[pcr]], [[pls]], [[tsqmtx]]

Revision as of 14:15, 10 October 2008

Purpose

Calculates matrix for T^2+Q contributions for PCA and MPCA.

Synopsis

[tsqqmat,tsqqs] = tsqqmtx(x,model,wt)

Description

Inputs

  • x = data matrix [class double or dataset]
  • model = PCA or MPCA model standard model struture (see PCA).

Optional Inputs

  • wt = {sqrt((M-K-1)/(M-1))}, 0<=wt<=1 scalar weighting for contributions 0<wt<1 gives combined T^2 and Q statistics where M is the number of calibration samples and K is the number of PCs.
wt = 1 gives T^2 and T^2 contributions
wt = 0 gives standarized Q residuals

Outputs

  • tsqqs = combined Hotelling's T^2 + Q residual
  • tsqqmat = matrix of individual variable contributions such that
tsqqs(i) = tsqqmat(i,:)*tsqqmat(i,:)';

See Also

datahat, pca, pcr, pls, tsqmtx