pingouin.circ_r

pingouin.
circ_r
(alpha, w=None, d=None, axis=0)[source] Mean resultant vector length for circular data.
 Parameters
 alphaarray
Sample of angles in radians
 warray
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.
 axisint
Compute along this dimension
 Returns
 rfloat
Mean resultant length
Notes
The length of the mean resultant vector is a crucial quantity for the measurement of circular spread or hypothesis testing in directional statistics. The closer it is to one, the more concentrated the data sample is around the mean direction (Berens 2009).
Examples
Mean resultant vector length of circular data
>>> from pingouin import circ_r >>> x = [0.785, 1.570, 3.141, 0.839, 5.934] >>> circ_r(x) 0.49723034495605356