File Exchange

image thumbnail


version 1.2 (6.29 KB) by

Inverse of the G 't Lam's one and two-sided cumulative distribution function (cdf).

1 Download


View License

Returns the inverse of the 't Lam's G one and two-sided cumulative distribution function with K variances and V interested degrees of freedom at the values in P.
This can be used as an alternative statistic to test the homoscedasticity of K samples.

In 1941, William G. Cochran presented a one-sided upper limit variance outlier test to check homoscedasticity. The called C test is used to decide if a single variance estimation is significantly larger than a group of variances and accounts for all variances within the range.

However, as 't Lam (2010) pointed out, the C test has limitations. It only applies to data sets of equal size. It uses critical values that are only available for the upper tail of the variance distribution, at selected numbers of data sets, selected numbers of replicates per set and only at two significance levels. Also, it will not identify an outlying low variance, but may mistake a high variance for an outlier instead. 't Lam (2010) transforms the C test into a more general 'G test'. It allows us to calculate upper limit as well as lower limit critical values for data sets of equal and unequal size at any significance level. The G test appears superior to the C test in detecting effects from low variances. The G test allows positive identification of exceptionally low variances.

By using the one-sided option, one can found the classical alpha-value 0.01 and 0.05 upper Cochran's C critical values.

For k balanced samples. The GTLAMINV gives exactly the Cochran's C (upper limit) critical value.

Here a m-file analytical procedure is developed as an alternative to the homogeinity of variances test.

Syntax: function x = gtlaminv(p,u,v,o)

p - p-value
u - vector of degrees of freedom
v - degrees of freedom of the interested numerator variance; for the Cochran's ratio it corresponds to the largest variance value
o - side option (=1, both one-sided upper and lower limit by default;~=1, both two-sided lower and upper limit)
x - 't Lam's G values

Comments and Ratings (0)



Text were improved.


It was added an appropriate format to cite this file.

MATLAB Release
MATLAB 7.10 (R2010a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video