Chilimit: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Jeremy
imported>Jeremy
Line 10: Line 10:
===Description===
===Description===


CHILIMIT determines a confidence limit for sum-of-squares residuals, (ssqr), by fitting the residuals to the g Chi-squared h distribution. If the sum-squared residuals are reasonably approximated by a Chi-squared distribution this gives a very good estimate of the confidence level. However, it has been observed that outliers can significantly bias the estimate.
CHILIMIT determines a confidence limit for sum-of-squares residuals by fitting the residuals to the g Chi-squared h distribution. If the sum-squared residuals are reasonably approximated by a Chi-squared distribution this gives a very good estimate of the confidence level. However, it has been observed that outliers can significantly bias the estimate.


The standard call to CHILIMIT uses the sum of squares residuals (ssqr), and the optional fractional confidence level requested, (cl) {default = 0.95}. Outputs are the calculated limit (lim), the scaling determined from the residuals (scl), and the degrees of freedom determined from the residuals (dof).
CHILIMIT can also calculate the confidence level corresponding to a given sum squared residual value (see '''flag''' and ''Calculating Confidence Level'' below)
 
====Inputs====
* '''ssqr''' = sum-of-squares residuals (a.k.a. Q)
====Optional Inputs====
* '''cl''' = confidence level (0<cl<1) {default = 0.95}
* '''flag''' = indicates if the inverse calculation should be done (=2) or the standard calculation should be done (=1) {default = 1}
====Outputs==== 
* '''lim''' = calculated limit.
* '''scl''' = scaling determined from the residuals.
* '''dof''' = degrees of freedom determined from the residuals.


The scaling, (scl), and number of degrees of freedom, (dof), returned from a previous call to CHILIMIT can be used in subsequent calls to CHILIMIT to obtain new limits without the original residuals.
The scaling, (scl), and number of degrees of freedom, (dof), returned from a previous call to CHILIMIT can be used in subsequent calls to CHILIMIT to obtain new limits without the original residuals.
====Calculating Confidence Level====
The inverse of chilimit must be called with four inputs using the scaling, degrees of freedom, ssqr, and the flag indicating that the inverse calculation should be done.
cl = chilimit(scl,dof,ssqr,2);
where the inputs (scl) and (dof) are outputs described above. The input (ssqr) corresponds to a sum-of-squared residual and the input 2 is a flag that tells the algorithm to calculate the inverse.


===See Also===
===See Also===


[[chitest]], [[distfit]], [[jmlimit]], [[pca]], [[pcr]], [[plotqq]], [[pls]], [[residuallimit]]
[[chitest]], [[distfit]], [[jmlimit]], [[pca]], [[pcr]], [[plotqq]], [[pls]], [[residuallimit]]

Revision as of 12:49, 22 February 2013

Purpose

Chi-squared confidence limits from sum-of-squares residuals.

Synopsis

[lim,scl,dof] = chilimit(ssqr,cl)
lim = chilimit(scl,dof,cl)

Description

CHILIMIT determines a confidence limit for sum-of-squares residuals by fitting the residuals to the g Chi-squared h distribution. If the sum-squared residuals are reasonably approximated by a Chi-squared distribution this gives a very good estimate of the confidence level. However, it has been observed that outliers can significantly bias the estimate.

CHILIMIT can also calculate the confidence level corresponding to a given sum squared residual value (see flag and Calculating Confidence Level below)

Inputs

  • ssqr = sum-of-squares residuals (a.k.a. Q)

Optional Inputs

  • cl = confidence level (0<cl<1) {default = 0.95}
  • flag = indicates if the inverse calculation should be done (=2) or the standard calculation should be done (=1) {default = 1}

Outputs

  • lim = calculated limit.
  • scl = scaling determined from the residuals.
  • dof = degrees of freedom determined from the residuals.

The scaling, (scl), and number of degrees of freedom, (dof), returned from a previous call to CHILIMIT can be used in subsequent calls to CHILIMIT to obtain new limits without the original residuals.

Calculating Confidence Level

The inverse of chilimit must be called with four inputs using the scaling, degrees of freedom, ssqr, and the flag indicating that the inverse calculation should be done.

cl = chilimit(scl,dof,ssqr,2);

where the inputs (scl) and (dof) are outputs described above. The input (ssqr) corresponds to a sum-of-squared residual and the input 2 is a flag that tells the algorithm to calculate the inverse.

See Also

chitest, distfit, jmlimit, pca, pcr, plotqq, pls, residuallimit