Wtfa

From Eigenvector Research Documentation Wiki
Revision as of 15:27, 3 September 2008 by imported>Jeremy (Importing text file)
Jump to navigation Jump to search

Purpose

Window target factor analysis.

Synopsis

[rho,angl,q,skl] = wtfa(spec,tspec,window,p,options)

Description

Inputs are a M by N data matrix spec, a K by N matrix of target spectra tspec, the window width window > 1, and the number of principal components, PCs, for modelling each window of spectra, p. The input p is used to govern the PCA model in each window:

  • p >= 1: (integer) number PCs is a constant p,
  • 0 < p < 1: sets a relative criterion for selecting number of PCs in each window i.e. only the first set of PCs that together capture >=p\*100Found of the variance in the window are used, or
  • p < 0: sets an absolute value for number of PCs i.e. factors with singular values <|p| are not used. EWFA (see EWFA) can be used as a guide for setting p when p<0.

Outputs are the cosines rho between tspec and a p component PCA model of spec in each window, angl [= acos(rho)], and Q residuals q. Note that the output values near the end of the record (less than the half width of the window) are plotted as dashed lines and the window center is output in the variable skl.

This routine is based on work in: Lohnes, M.T., Guy, R.D., and Wentzell, P.D., "Window Target-Testing Factor Analysis: Theory and Application to the Chromatographic Analysis of Complex Mixtures with Multiwavelength Flourescence Detection", Anal. Chim. Acta, 389, 95-113 (1999).

Options

  • options = a structure array with the following fields:
  • plots: [ 'none' | {'angle'} | 'rho' | 'q' ], governs plotting,
  • 'angle', plots projection angle {default},
  • 'rho', plots direction cosine, and
  • 'q', plots Q residuals.
  • scale: [ ], is a M element time scale to plot against

The default options can be retreived using: options = wtfa('options');.

See Also

evolvfa, ewfa, pca