Residuallimit

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

Purpose

Esitmates confidence limits for sum squared residuals.

Synopsis

[rescl,s] = residuallimit(residuals,cl,options)
[rescl,s] = residuallimit(model,cl,options)
rescl = residuallimit(s,cl,options)
options = residuallimit('options');.

Description

Inputs are a matrix of residuals, residuals, and a frational confidence limit, cl, where 0<cl<1 {default = 0.95}. For example, for a PCA model X = TPT + E, the input residuals is the matrix E which can be calculated using the datahat function or a standard model structure (model). Optional input options is discussed below. To calculate multiple confidence limits, cl can be a vector of fractional confidence limits. Two alternate methods of calling RESIDUALLIMIT are: (a) When using the Jackson-Mudholkar method (see options) the eigenvalues of the residuals, s, can be passed in place of residuals. This is typically faster than passing the residuals themselves. (b) A standard model structure, model, can be passed in place of residuals. In this case, RESIDUALLIMIT will locate valid residual information within the model and use that to calculate the limit. The output is the estimated residual limit rescl. When using the Jackson-Mudholkar algorithm, an additional output, s, is also returned containing eigenvalues of E. To improve speed, s can be used in place of residuals in subsequent calls to RESIDUALLIMIT for the same data. See Jackson (1991) for the details of the calculation.

Options

  • options = a structure array with the following fields:
  • algorithm: [ {'jm'} | 'chi2' | 'auto' ], governs choice of algorithm:
  • 'jm', uses Jackson-Mudholkar method (slower, more robust),
  • 'chi2', uses chi-squared moment method (faster, less robust with outliers), and
  • 'auto' automatically selects based on data size (<300 rows or columns, use 'jm', otherwise, use 'chi2')

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

Examples

The following example will calculate the 95Found residuals confidence limit for a model, model, using the residual eigenvalues stored in the model:

rescl = residuallimit(model,0.95);

The following example will also calculate the 95Found residuals confidence limit for a model, model, but by using the actual residuals calculated from the calibration data, data, using the datahat function:

[xhat,residuals] = datahat(model,data);
rescl = residuallimit(residuals,0.95);

See Also

chilimit, analysis, datahat, pca