Performs Watson's test for homogeneity on two samples of circular data.
Usage
watson.two(x, y, alpha=0, plot=FALSE)
Arguments
x
vector of circular data measured in radians.
y
vector of circular data measured in radians.
alpha
significance level of the test. Valid levels are 0.001, 0.01, 0.05, 0.1. This argument may be ommited, in which case, a range for the p-value will be returned.
plot
logical value. If TRUE, an overlayed plot of both empirical distribution functions will be sent to the current graphics device. The default value if FALSE.
Details
Critical values for the test statistic are obtained using the asymptotic distribution of the test statistic. It is recommended to use the obtained critical values and ranges for p-values only for combined sample sizes in excess of 17. Tables are available for smaller sample sizes and can be found in Mardia (1972) for instance.
Value
NULL
Note
Watson's two-sample test of homogeneity is performed, and the results are printed to the screen. 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 plot=TRUE, an overlayed plot of both empirical distribution functions will be sent to the current graphics device.
References
Jammalamadaka, S. Rao and SenGupta, A. (2001). Topics in Circular Statistics, Section 7.5, World Scientific Press, Singapore.
Examples
# Perform a two-sample test of homogeneity on two
# simulated data sets.
data1 <- rvm(20, 0, 3)
data2 <- rvm(20, pi, 2)
watson.two(data1, data2, alpha=0.05, plot=TRUE)
watson.two(data1, data2)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(CircStats)
Loading required package: MASS
Loading required package: boot
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/CircStats/watson.two.Rd_%03d_medium.png", width=480, height=480)
> ### Name: watson.two
> ### Title: Watson's Two-Sample Test of Homogeneity
> ### Aliases: watson.two
> ### Keywords: htest
>
> ### ** Examples
>
> # Perform a two-sample test of homogeneity on two
> # simulated data sets.
> data1 <- rvm(20, 0, 3)
> data2 <- rvm(20, pi, 2)
> watson.two(data1, data2, alpha=0.05, plot=TRUE)
Watson's Two-Sample Test of Homogeneity
Test Statistic: 0.8149
Level 0.05 Critical Value: 0.187
Reject Null Hypothesis
> watson.two(data1, data2)
Watson's Two-Sample Test of Homogeneity
Test Statistic: 0.8149
P-value < 0.001
>
>
>
>
>
> dev.off()
null device
1
>