circular_test: Two sample Test of Homogeneity

Description Usage Arguments Value Examples

View source: R/crit_val.R

Description

This function allows to perform various nonparametric test for homogeneity on two samples of circular data.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
circular_test(
  x,
  y,
  test = "dixon",
  alpha = 0.05,
  B = NULL,
  type = "exact",
  seed = 1982,
  circle = TRUE
)

Arguments

x

first sample

y

second sample

test

considered test (dixon for Dixon test (default); ww for Wheeler-Watson; wilcox for Wilcoxon test; rao for Rao test; vdw for van der Waerden test; savage for Savage test

alpha

significance level (default = 0.05)

B

number of bootstrap replications

seed

seed used for random number generation

type

method to compute pvalues (available methods: exact for exact computation (default) which is appropriate for small sample sizes; mc for approximation based on Monte-carlo simulations)

Value

A list with the following structure:

cv

a list containing the results of the exact distribution (NULL if type = "mc"), see function get_critical_values for details

mc

a list containing the results of the approximated distribution obtained by simulation (NULL if type = "exact"), see function MC_pvalue for details

B

number of bootstrap replications

alpha

significance level

test

the considered test

stat

observed test statistic

spacings

a list containing the observed spacings, see function compute_Sk for details

x

expression deparsing of the first dataset

y

expression deparsing of the second dataset

Examples

1
2
3
4
5
6
7
# Load dataset
data(pigeons)
# Dixon test (exact pvalue)
circular_test(pigeons$experimental, pigeons$control)

# Dixon test (approximated pvalue)
circular_test( pigeons$experimental, pigeons$control, type = "mc")

SMAC-Group/circTest documentation built on Oct. 7, 2020, 7:18 p.m.