Learn R Programming

circular (version 0.5-1)

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

Description

Performs the Watson-Williams test for homogeneity of means between several samples of circular data.

Usage

watson.williams.test(x, ...)

# S3 method for default watson.williams.test(x, group, ...)

# S3 method for list watson.williams.test(x, ...)

# S3 method for formula watson.williams.test(formula, data, ...)

Value

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.

Arguments

x

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

group

a vector or factor object giving the group 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.

Author

Jean-Olivier Irisson

Details

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.

References

Batschelet, E (1981). Circular Statistics in Biology. chap. 6.2, p. 99

Mardia, KV and Jupp, PE (2000). Directional statistics. p. 135

Examples

Run this code

# 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)

Run the code above in your browser using DataLab