cochranTest | R Documentation |
Performs Cochran's test for testing an outlying (or inlying) variance.
cochranTest(x, ...)
## Default S3 method:
cochranTest(x, g, alternative = c("greater", "less"), ...)
## S3 method for class 'formula'
cochranTest(
formula,
data,
subset,
na.action,
alternative = c("greater", "less"),
...
)
x |
a numeric vector of data values, or a list of numeric data vectors. |
... |
further arguments to be passed to or from methods. |
g |
a vector or factor object giving the group for the
corresponding elements of |
alternative |
the alternative hypothesis. Defaults to |
formula |
a formula of the form |
data |
an optional matrix or data frame (or similar: see
|
subset |
an optional vector specifying a subset of observations to be used. |
na.action |
a function which indicates what should happen when
the data contain |
For normally distributed data the null hypothesis,
H_0: \sigma_1^2 = \sigma_2^2 = \ldots = \sigma_k^2
is tested against the alternative (greater)
H_{\mathrm{A}}: \sigma_p > \sigma_i ~~ (i \le k, i \ne p)
with
at least one inequality being strict.
The p-value is computed with the function pcochran
.
A list with class "htest"
containing the following components:
a character string indicating what type of test was performed.
a character string giving the name(s) of the data.
the estimated quantile of the test statistic.
the p-value for the test.
the parameters of the test statistic, if any.
a character string describing the alternative hypothesis.
the estimates, if any.
the estimate under the null hypothesis, if any.
Cochran, W.G. (1941) The distribution of the largest of a set of estimated variances as a fraction of their total. Ann. Eugen. 11, 47–52.
Wilrich, P.-T. (2011) Critical values of Mandel's h and k, Grubbs and the Cochran test statistic. Adv. Stat. Anal.. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/s10182-011-0185-y")}.
bartlett.test
, fligner.test
.
data(Pentosan)
cochranTest(value ~ lab, data = Pentosan, subset = (material == "A"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.