Tsqlim: Difference between revisions
imported>Neal |
imported>Donal |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
===Purpose=== | ===Purpose=== | ||
Calculates PCA confidence limits for Hotelling's T<sup>2</sup>. | Calculates PCA confidence limits for Hotelling's T<sup>2</sup>, or calculates the confidence level corresponding to given a Hotelling's T<sup>2</sup> value and the corresponding model information. | ||
===Synopsis=== | ===Synopsis=== | ||
Line 7: | Line 7: | ||
:tsqcl = tsqlim(m,pc,cl) | :tsqcl = tsqlim(m,pc,cl) | ||
:tsqcl = tsqlim(model,cl) | :tsqcl = tsqlim(model,cl) | ||
:cl = tsqlim(m,pc,tsq,2); | |||
:cl = tsqlim(model,tsq,2); | |||
===Description=== | ===Description=== | ||
Line 21: | Line 23: | ||
where <math>K</math> is the number of PCs, <math>M</math> is the number of samples and <math>{{F}_{K,M-K,\alpha }}</math> is the F distribution with <math>K</math> degrees of freedom in the numberator and <math>M-K</math> degrees of freedom in the denominator, and probability point <math>\alpha</math>. | where <math>K</math> is the number of PCs, <math>M</math> is the number of samples and <math>{{F}_{K,M-K,\alpha }}</math> is the F distribution with <math>K</math> degrees of freedom in the numberator and <math>M-K</math> degrees of freedom in the denominator, and probability point <math>\alpha</math>. | ||
====Inputs==== | |||
* '''m''' = the number of samples. | |||
* '''pc''' = the number of PCs. | |||
* '''cl''' = the confidence limit (cl) where 0 < cl < 1. | |||
Optionally, (m) and (pc) can be omitted and a standard model structure (model) can be passed along with the confidence limit (cl). | |||
====Optional Inputs==== | |||
* '''flag''' = [ {1} | 2 ] governs how the function is called. 1 = calculates the T^2 at the CL (default), 2 = calculates the CL from an input T^2 (tsq) (This is similar to how FTEST is used) When flag=2, | |||
====Outputs==== | |||
* '''tsqcl''' = the confidence limit. (See optional input flag for the inverse calculation.) | |||
===Examples=== | ===Examples=== | ||
Line 30: | Line 45: | ||
===See Also=== | ===See Also=== | ||
[[analysis]], [[pca]], [[pcr]], [[pls]] | [[analysis]], [[chilimit]], [[pca]], [[pcr]], [[pls]], [[subgroupcl]] |
Latest revision as of 21:17, 10 June 2014
Purpose
Calculates PCA confidence limits for Hotelling's T2, or calculates the confidence level corresponding to given a Hotelling's T2 value and the corresponding model information.
Synopsis
- tsqcl = tsqlim(m,pc,cl)
- tsqcl = tsqlim(model,cl)
- cl = tsqlim(m,pc,tsq,2);
- cl = tsqlim(model,tsq,2);
Description
Inputs can be in one of two forms:
(a) the number of samples m, the number of principal components used pc, and the fractional confidence limit, cl (0 < cl < 1) which can be a scalar or a vector (to calculate multiple confidence limits simultaneously).
or (b) a standard model structure, model, and the fractional confidence limit, cl (0 < cl < 1).
The output tsqcl is the confidence limit based on an F distribution as shown below. See Jackson (1991).
where is the number of PCs, is the number of samples and is the F distribution with degrees of freedom in the numberator and degrees of freedom in the denominator, and probability point .
Inputs
- m = the number of samples.
- pc = the number of PCs.
- cl = the confidence limit (cl) where 0 < cl < 1.
Optionally, (m) and (pc) can be omitted and a standard model structure (model) can be passed along with the confidence limit (cl).
Optional Inputs
- flag = [ {1} | 2 ] governs how the function is called. 1 = calculates the T^2 at the CL (default), 2 = calculates the CL from an input T^2 (tsq) (This is similar to how FTEST is used) When flag=2,
Outputs
- tsqcl = the confidence limit. (See optional input flag for the inverse calculation.)
Examples
tsqcl = tsqlim(15,2,0.95)
model = pca(data,pc); tsqcl = tsqlim(model,0.95)