cochran.test: Test for outlying or inlying variance

cochran.testR Documentation

Test for outlying or inlying variance

Description

This test is useful to check if largest variance in several groups of data is "outlying" and this group should be rejected. Alternatively, if one group has very small variance, we can test for "inlying" variance.

Usage

cochran.test(object, data, inlying = FALSE)

Arguments

object

A vector of variances or formula.

data

If object is a vector, data should be another vector, giving number of data in each corresponding group. If object is a formula, data should be a dataframe.

inlying

Test smallest variance instead of largest.

Details

The corresponding p-value is calculated using pcochran function.

Value

A list with class htest containing the following components:

statistic

the value of Cochran-statistic.

p.value

the p-value for the test.

alternative

a character string describing the alternative hypothesis.

method

a character string indicating what type of test was performed.

data.name

name of the data argument.

estimate

vector of variance estimates

Author(s)

Lukasz Komsta

References

Snedecor, G.W., Cochran, W.G. (1980). Statistical Methods (seventh edition). Iowa State University Press, Ames, Iowa.

See Also

qcochran

Examples

set.seed(1234)
x=rnorm(100)
d=data.frame(x=x,group=rep(1:10,10))
cochran.test(x~group,d)
cochran.test(x~group,d,inlying=TRUE)
x=runif(5)
cochran.test(x,rep(5,5))
cochran.test(x,rep(100,5))

outliers documentation built on March 26, 2022, 9:05 a.m.