View source: R/watson.wheeler.test.R
watson.wheeler.test | R Documentation |
Performs the Watson-Wheeler test for homogeneity on two or more samples of circular data.
watson.wheeler.test(x, ...)
## Default S3 method:
watson.wheeler.test(x, group, ...)
## S3 method for class 'list'
watson.wheeler.test(x, ...)
## S3 method for class 'formula'
watson.wheeler.test(formula, data, ...)
x |
a vector of angles (coerced to class |
group |
a vector or factor object giving the groups 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-Wheeler (or Mardia-Watson-Wheeler, or uniform score) test is a non-parametric test to compare two or several samples. The difference between the samples can be in either the mean or the variance.
The p-value is estimated by assuming that the test statistic follows a chi-squared distribution. For this approximation to be valid, all groups must have at least 10 elements.
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 |
W, the statistic of the test, which is approximately distributed as a chi-squared. |
parameter |
the degrees of freedom for the chi-squared approximation of the statistic. |
p.value |
the p-value for the test. |
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.3, p. 104
Zar, J H (1999). Biostatistical analysis. section 27.5, p. 640
# Example used in Zar (1999)
x1 <- circular(c(35, 45, 50, 55, 60, 70, 85, 95, 105, 120),
units="degrees", template="geographics")
x2 <- circular(c(75, 80, 90, 100, 110, 130, 135, 140, 150, 160, 165),
units="degrees", template="geographics")
watson.wheeler.test(list(x1,x2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.