Computes the mean resultant vector length for circular data, a measure of
concentration (0 = uniform, 1 = perfectly aligned). Port of MATLAB circ_r
from the Circular Statistics Toolbox (Berens, 2009).
Arguments
- alpha
numeric vector or matrix of angles in radians.
- w
optional weights (same dimensions as
alpha). If NULL, uniform weights.- d
optional spacing of bin centers for binned data (radians). If provided, applies correction factor for bias in estimation of r.
- dim
integer; dimension along which to compute (default 1).
References
Berens P (2009). CircStat: A MATLAB Toolbox for Circular Statistics. Journal of Statistical Software, 31(10), 1-21.
Zar JH (2010). Biostatistical Analysis. 5th ed. Prentice Hall. (Equation 26.16)