Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

watson.test

Watson's Test


Description

Performs a Watson's goodness of fit test for the von Mises or circular uniform distribution.

Usage

watson.test(x, alpha=0, dist=c("uniform", "vonmises"))
## S3 method for class 'watson.test'
print(x, digits = 4, ...)

Arguments

x

a vector. The object is coerced to class circular.

alpha

significance level of the test. Valid levels are 0.01, 0.05, 0.1. This argument may be ommited, in which case, a range for the p-value will be returned.

dist

distribution to test for. The default is the uniform distribution. To test for the von Mises distribution, set dist to "vonmises".

digits

integer indicating the precision to be used.

...

further arguments passed to or from other methods.

Details

If dist = "uniform", Watson's one-sample test for the circular uniform distribution is performed, and the results are printed. If alpha is specified and non-zero, the test statistic is printed along with the critical value and decision. If alpha is omitted, the test statistic is printed and a range for the p-value of the test is given.

If dist = "vonmises", estimates of the population parameters are used to evaluate the von Mises distribution function at all data points, thereby arriving at a sample of approximately uniformly distributed data, if the original observations have a von Mises distribution. The one-sample Watson test is then applied to the transformed data as above.

Value

a list with the statistic, alpha, the number of observations, the distribution and 'row' which is used by print.watson.test to evaluate the p-value.

Author(s)

Claudio Agostinelli and Ulric Lund

References

Jammalamadaka, S. Rao and SenGupta, A. (2001). Topics in Circular Statistics, Section 7.2, World Scientific Press, Singapore.

Stephens, M. (1970). Use of the Kolmogorov-Smirnov, Cramer-von Mises and related statistics without extensive tables. Journal of the Royal Statistical Society, B32, 115-122.

See Also

Examples

# Generate data from the uniform distribution on the circle.
x <- circular(runif(100, 0, 2*pi))  
watson.test(x)
# Generate data from a von Mises distribution.
x <- rvonmises(n=50, mu=circular(0), kappa=4) 
watson.test(x, alpha=0.05, dist="vonmises")

circular

Circular Statistics

v0.4-93
GPL-2
Authors
Ulric Lund <ulund@calpoly.edu> [aut], Claudio Agostinelli <claudio.agostinelli@unitn.it> [aut, cre], Hiroyoshi Arai <h_arai@aoni.waseda.jp> [ctb], Alessando Gagliardi <gagliardi@stud.unive.it> [ctb], Eduardo Garcia Portugues <edgarcia@est-econ.uc3m.es> [ctb], Dimitri Giunchi <dimitri.giunchi@unipi.it> [ctb], Jean-Olivier Irisson <irisson@normalesup.org> [ctb], Matthew Pocernich <pocernic@ucar.edu> [ctb], Federico Rotolo [ctb]
Initial release
2017-06-26

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.