View source: R/watson.williams.test.R
watson.williams.test | R Documentation |
Performs the Watson-Williams test for homogeneity of means between several samples of circular data.
watson.williams.test(x, ...)
## Default S3 method:
watson.williams.test(x, group, ...)
## S3 method for class 'list'
watson.williams.test(x, ...)
## S3 method for class 'formula'
watson.williams.test(formula, data, ...)
x |
a vector of angles (coerced to class |
group |
a vector or factor object giving the group for the corresponding elements of |
formula |
a formula of the form |
data |
an optional data.frame containing the variables in the formula |
... |
further arguments passed to or from other methods. |
The Watson-Williams test for the homogeneity of means between two or more groups is performed and the results are printed. The null hypothesis is that means are equal across groups.
The assumptions are that: (1) the samples are drawn from populations with a von Mises distribution; (2) the parameter of concentration has the same value in all populations; (3) this parameter is sufficiently large (i.e. > 1). Assumptions 2 and 3 are checked and a warning is issued if they are not met.
In the default method, x
is a vector of angles and group
must be a vector or factor object of the same length as x
giving the group for the corresponding elements of x
.
If x
is a list, its elements are taken as the samples to be compared.
In the formula
method, the angles and grouping elements are identified as the left and right hand side of the formula respectively.
All angles should be of class circular
and will be coerced as such if they are not.
A list with class "htest"
containing the following components:
statistic |
the F statistic of the test. |
parameter |
the degrees of freedom for the F statistic. |
p.value |
the p-value for the test. |
estimate |
a vector of the means of each group. |
method |
a character string containing the name of the test. |
data.name |
a character string giving the name(s) of the data. |
Jean-Olivier Irisson
Batschelet, E (1981). Circular Statistics in Biology. chap. 6.2, p. 99
Mardia, KV and Jupp, PE (2000). Directional statistics. p. 135
# Ant orientation from Duelli and Wehner (1973)
# Example used in Batschelet (1981)
data <- list(
exp = circular(rep(c(-20, -10, 0), c(1,7,2)),
units="degrees", template="geographics"),
control = circular(rep(c(-10, 0, 10, 20), c(3,3,3,1)),
units="degrees", template="geographics")
)
watson.williams.test(data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.