`CircStats.circ_axial`

— FunctionTransforms p-axial data to a common scale.

- α: sample of angles in radians
- p: number of modes(default=1)

return: transformed data

`CircStats.circ_clust`

— MethodPerforms a simple agglomerative clustering of angular data.

- α: sample of angles in radians

- k: number of clusters desired, default=2

return:

- cid: cluster id for each entry of α
- α: sorted angles, matched with cid
- μ: mean direction of angles in each cluster

`CircStats.circ_confmean`

— MethodComputes the confidence limits on the mean for circular data.

`1. α: sample of angles in radians`

- xi: (1-xi) confidence limits are computed, default=0.05
- w: number of incidences in case of binned angle data
- d: spacing of bin centers for binned data, used to correct for bias in estimation of r, in radians
- dims: compute along this dimension(default=1)

`return: mean ± d yields upper/lower (1-xi)% confidence limit`

`CircStats.circ_corrcc`

— MethodCircular correlation coefficient for two circular random variables.

- α₁: sample of angles in radians
- α₂: sample of angles in radians

return:

- ρ: correlation coefficient
- p: p-value

`CircStats.circ_corrcl`

— MethodCorrelation coefficient between one circular and one linear random variable.

- α: sample of angles in radians
- x: sample of linear random variable

return:

- ρ: correlation coefficient
- p: p-value

`CircStats.circ_dist`

— MethodPairwise difference α-β around the circle computed efficiently.

- α: sample of linear random variable
- β: sample of linear random variable or one single angle

return: matrix with differences

`CircStats.circ_dist2`

— MethodAll pairwise difference α-β around the circle computed efficiently.

- α: sample of linear random variable
- β: sample of linear random variable

return: matrix with pairwise differences

`CircStats.circ_hktest`

— MethodParametric two-way ANOVA for circular data with interations.

!!!note The test assumes underlying von-Mises distributrions. All groups are assumed to have a common concentration parameter k, between 0 and 2.

- α: angles in radians
- idp: indicates the level of factor 1 (1:p)
- idq: indicates the level of factor 2 (1:q)

```
- inter: whether to include effect of interaction
- fn: string array containing names of the factors
```

return:

- p: pvalues for factors and interaction
- s: statistic of each p value

`CircStats.circ_kappa`

— MethodComputes an approximation to the ML estimate of the concentration parameter kappa of the von Mises distribution.

- α: angles in radians OR α is length resultant

`- w: number of incidences in case of binned angle data`

return: estimated value of kappa

`CircStats.circ_ktest`

— MethodA parametric two-sample test to determine whether two concentration parameters are different.

H0: The two concentration parameters are equal. HA: The two concentration parameters are different.

Assumptions: both samples are drawn from von Mises type distributions and their joint resultant vector length should be > .7

- α₁: sample of angles in radians
- α₂: sample of angles in radians

return:

- p: p-value that samples have different concentrations
- f: f-statistic calculated

`CircStats.circ_kuipertest`

— MethodThe Kuiper two-sample test tests whether the two samples differ significantly. The difference can be in any property, such as mean location and dispersion. It is a circular analogue of the Kolmogorov-Smirnov test.

H0: The two distributions are identical. HA: The two distributions are different.

- α₁: sample of angles in radians
- α₂: sample of angles in radians

`- n: resolution at which the cdf are evaluated`

return:

- p: p-value; the smallest of .10, .05, .02, .01, .005, .002, .001, for which the test statistic is still higher than the respective critical value. this is due to the use of tabulated values. if p>.1, pval is set to 1.
- k: test statistic
- K: critical value

`CircStats.circ_kurtosis`

— MethodCalculates a measure of angular kurtosis.

- α: sample of angles in radians

```
- w: weightings in case of binned angle data
- dims: compute along this dimension(default=1)
```

return:

- k: kurtosis (from Pewsey)
- k0: kurtosis (from Fisher)

`CircStats.circ_mean`

— MethodComputes the mean direction for circular data.

```
1. α: sample of angles in radians
- w: weightings in case of binned angle data
- dims: compute along this dimension(default=1)
return:
- μ: mean direction
- ul: upper 95% confidence limit
- ll: lower 95% confidence limit
```

`CircStats.circ_median`

— MethodComputes the median direction for circular data.

- α: sample of angles in radians

return: median direction

`CircStats.circ_medtest`

— MethodTests for significance of the median.

H0: the population has median angle `md`

HA: the population has not median angle `md`

- α: sample of angles in radians

- md: median to test, default=0

return: p-value

`CircStats.circ_moment`

— MethodCalculates the complex p-th centred or non-centred moment of the angular data in angle.

- α: sample of angles in radians

- w: number of incidences in case of binned angle data
- p: p-th moment to be computed, default=1
- cent: if true, central moments are computed, default = false
- dims: compute along this dimension(default=1)

return:

- mp: complex p-th moment
- ρp: magnitude of the p-th moment
- μp: angle of th p-th moment

`CircStats.circ_mtest`

— MethodOne-Sample test for the mean angle. H0: the population has mean `m`

. HA: the population has not mean `m`

.

!!!note: This is the equvivalent to a one-sample t-test with specified mean direction.

- α: sample of angles in radians

- m: assumed mean direction, default=0
- w: number of incidences in case of binned angle data
- d: spacing of bin centers for binned data, used to correct for bias in estimation of r, in radians
- xi: alpha level of the test

return:

- h: false if H0 can not be rejected, true otherwise
- μ: mean
- ul: upper (1-xi) confidence level
- ll: lower (1-xi) confidence level

`CircStats.circ_otest`

— MethodComputes Omnibus or Hodges-Ajne test for non-uniformity of circular data.

```
H0: the population is uniformly distributed around the circle
HA: the population is not distributed uniformly around the circle
Alternative to the Rayleigh and Rao's test. Works well for unimodal,
bimodal or multimodal data. If requirements of the Rayleigh test are met, the latter is more powerful.
1. α: sample of angles in radians
- sz: step size for evaluating distribution, default 1 degree
- w: number of incidences in case of binned angle data
return:
- p: p-value
- m: minimum number of samples falling in one half of the circle
```

`CircStats.circ_r`

— MethodComputes mean resultant vector length for circular data.

```
1. α: sample of angles in radians
- w: number of incidences in case of binned angle data
- d: spacing of bin centers for binned data, used to correct for bias in estimation of r, in radians
- dims: compute along this dimension(default=1)
return: mean resultant length
```

`CircStats.circ_raotest`

— MethodCalculates Rao's spacing test by comparing distances between points on a circle to those expected from a uniform distribution. H0: Data is distributed uniformly around the circle. H1: Data is not uniformly distributed around the circle.

Alternative to the Rayleigh test and the Omnibus test. Less powerful than the Rayleigh test when the distribution is unimodal on a global scale but uniform locally.

Due to the complexity of the distributioin of the test statistic, we resort to the tables published by Russell, Gerald S. and Levitin, Daniel J.(1995) An expanded table of probability values for rao's spacing test, Communications in Statistics - Simulation and Computation Therefore the reported p-value is the smallest α level at which the test would still be significant. If the test is not significant at the α=0.1 level, we return the critical value for α = 0.05 and p = 0.5.

- α: sample of angles in radians

return:

- p: smallest p-value at which test would be significant
- u: computed value of the test-statistic u
- UC: critical value of the test statistic at sig-level

`CircStats.circ_rtest`

— MethodComputes Rayleigh test for non-uniformity of circular data.

`H0: the population is uniformly distributed around the circle`

HA: the populatoin is not distributed uniformly around the circle Assumption: the distribution has maximally one mode and the data is sampled from a von Mises distribution!

```
1. α: sample of angles in radians
- w: number of incidences in case of binned angle data
- d: spacing of bin centers for binned data, used to correct for bias in estimation of r, in radians
return:
- p: p-value of Rayleigh's test
- z: value of the z-statistic
```

`CircStats.circ_samplecdf`

— MethodHelper function for circ_kuipertest. Evaluates CDF of sample.

- α: sample of angles in radians

`- n: resolution at which the cdf are evaluated`

return:

- ϕ: angles at which CDF are evaluated
- c: CDF values at ϕ

`CircStats.circ_skewness`

— MethodCalculates a measure of angular skewness.

```
1. α: sample of angles in radians
- w: weightings in case of binned angle data
- dims: compute along this dimension(default=1)
return:
- b: skewness (from Pewsey)
- b0: alternative skewness measure (from Fisher)
```

`CircStats.circ_stats`

— MethodComputes descriptive statistics for circular data.

- α: sample of angles in radians

```
- w: weightings in case of binned angle data
- d: spacing of bin centers for binned data, used to correct for bias in estimation of r, in radians
```

return: descriptive statistics

`CircStats.circ_std`

— MethodComputes circular standard deviation for circular data (equ. 26.20, Zar).

`1. α: sample of angles in radians`

- w: weightings in case of binned angle data
- d: spacing of bin centers for binned data, used to correct for bias in estimation of r, in radians
- dims: compute along this dimension(default=1)

`return:`

- s: angular deviation
- s0: circular standard deviation

`CircStats.circ_symtest`

— MethodTests for symmetry about the median. H0: the population is symmetrical around the median HA: the population is not symmetrical around the median

- α: sample of angles in radians

return: p-value

`CircStats.circ_var`

— MethodComputes circular variance for circular data (equ. 26.17/18, Zar).

`1. α: sample of angles in radians`

- w: number of incidences in case of binned angle data
- d: spacing of bin centers for binned data, used to correct for bias in estimation of r, in radians

```
- dims: compute along this dimension(default=1)
return:
- S: circular variance 1-r
- s: angular variance 2(1-r)
```

`CircStats.circ_vtest`

— MethodComputes V test for non-uniformity of circular data with a specified mean direction.

H0: the population is uniformly distributed around the circle HA: the population is not distributed uniformly around the circle but has a mean of `m`

.

!!!note Not rejecting H0 may mean that the population is uniformly distributed around the circle OR that it has a mode but that this mode is not centered at `m`

.

The V test has more power than the Rayleigh test and is preferred if there is reason to believe in a specific mean direction.

- α: sample of angles in radians

- m: suspected mean direction, default=0
- w: number of incidences in case of binned angle data
- d: spacing of bin centers for binned data, used to correct for bias in estimation of r, in radians

return:

- p: p-value of V test
- v: value of the V statistic

`CircStats.circ_wwtest`

— MethodParametric Watson-Williams multi-sample test for equal means. Can be used as a one-way ANOVA test for circular data.

H0: the s populations have equal means HA: the s populations have unequal means

!!! note Use with binned data is only advisable if binning is finer than 10 deg. In this case, α is assumed to correspond to bin centers.

The Watson-Williams two-sample test assumes underlying von-Mises distributrions. All groups are assumed to have a common concentration parameter k.

- α: angles in radians
- idx: indicates which population the respective angle in α comes from, 1:s

`- w: number of incidences in case of binned angle data`

return:

- p: p-value of the Watson-Williams multi-sample test. Discard H0 if p is small.
- F: F statistics