This package implements various nonparametric methods for testing whether two circular samples come from the same population and allows to obtain its associated small-sample distribution. In particular, the following test are considered:

  • dixon: for Dixon test,
  • rao: for Rao test,
  • wilcox: for Wilcoxon test,
  • ww for Wheeler-Watson test.

The code below presents a simple example with the pigeons dataset of Schmidt-Koenig (1958).

It is also possible to compare the exact distribution of the test statistic under \(H_0\) to the one obtained by simulations. This can be done as follows:

par(mfrow = c(1,2))
plot(circular_test(pigeons$experimental, pigeons$control), cex.main = 0.7)
plot(circular_test(pigeons$experimental, pigeons$control, type = "mc", B = 10^3), cex.main = 0.7)

The simulation-based approach is proposed here as an alternative to reduce the computational burden of then method when the samples are too large to allow for the calculation of the exact sampling distribution through exhaustive enumeration of all possible combinations. When the number of Monte-Carlo replication is relatively large (say around \(10^3\) or more) the results with the exact and approximated method are very close. In addition, this method also provides an estimate of the standard error associated to the obtained p-value, which is computed by nonparametric bootstrap. The precision of the simulation-based approach is illustrated in the simple simulation presented below where we compared the p-values obtained with the exact and simulation-based method.

The difference between the p-values obtained from the two methods are presented in the histograms below:

Install Instructions

To install the TwoCircles package, there is currently one option: GitHub.