Test for outlying or inlying variance
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.
cochran.test(object, data, inlying = FALSE)
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. |
The corresponding p-value is calculated using pcochran
function.
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 |
Lukasz Komsta
Snedecor, G.W., Cochran, W.G. (1980). Statistical Methods (seventh edition). Iowa State University Press, Ames, Iowa.
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))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.