circ_vtest(angles, dir=0.0, w=None, d=None)
V test for non-uniformity of circular data with a specified mean direction.
- angles1-D array_like
Samples of angles in radians. The range of
anglesmust be either \([0, 2\pi]\) or \([-\pi, \pi]\). If
anglesis not expressed in radians (e.g. degrees or 24-hours), please use the
pingouin.convert_angles()function prior to using the present function.
Suspected mean direction (angle in radians).
Number of incidences per bins (i.e. “weights”), in case of binned angle data.
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.
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.
V-test for non-uniformity 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(round(v, 3), pval) 2.486 0.05794648732225438
Specifying w and d
>>> v, pval = circ_vtest(x, dir=0.5, w=[.1, .2, .3, .4, .5], d=0.2) >>> print(round(v, 3), round(pval, 5)) 0.637 0.23086