pingouin.circ_vtest

pingouin.
circ_vtest
(alpha, dir=0.0, w=None, d=None)[source] V test for nonuniformity of circular data with a specified mean direction.
 Parameters
 alphanp.array
Sample of angles in radians.
 dirfloat
Suspected mean direction (angle in radians).
 wnp.array
Number of incidences in case of binned angle data.
 dfloat
Spacing (in radians) of bin centers for binned data. If supplied, a correction factor is used to correct for bias in the estimation of r.
 Returns
 Vfloat
Vstatistic
 pvalfloat
Pvalue
Notes
H0: the population is uniformly distributed around the circle. HA: the population is not distributed uniformly around the circle but has a mean of dir.
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 dir.
The V test has more power than the Rayleigh test and is preferred if there is reason to believe in a specific mean direction.
Adapted from the Matlab Circular Statistics Toolbox.
Examples
Vtest for nonuniformity of circular data.
>>> from pingouin import circ_vtest >>> x = [0.785, 1.570, 3.141, 0.839, 5.934] >>> v, pval = circ_vtest(x, dir=1) >>> print(v, pval) 2.486 0.05794648732225438
Specifying w and d
>>> circ_vtest(x, dir=0.5, w=[.1, .2, .3, .4, .5], d=0.2) (0.637, 0.23086492929174185)