watson.wheeler.test: Watson-Williams Test of Homogeneity of Means

Description Usage Arguments Details Value Author(s) References Examples

View source: R/watson.wheeler.test.R

Description

Performs the Watson-Wheeler test for homogeneity on two or more samples of circular data.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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, ...)

Arguments

x

a vector of angles (coerced to class circular) or a list of such angles.

group

a vector or factor object giving the groups for the corresponding elements of x. Ignored if x is a list

formula

a formula of the form lhs ~ rhs where lhs is a vector of angles and rhs a vector or factor giving the corresponding groups.

data

an optional data.frame containing the variables in the formula formula.

...

further arguments passed to or from other methods.

Details

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.

Value

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.

Author(s)

Jean-Olivier Irisson

References

Batschelet, E (1981). Circular Statistics in Biology. chap 6.3, p. 104

Zar, J H (1999). Biostatistical analysis. section 27.5, p. 640

Examples

1
2
3
4
5
6
7
# 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))

circular documentation built on July 4, 2017, 9:03 a.m.