statsmodels.robust.scale.qn_scale¶
-
statsmodels.robust.scale.qn_scale(a, c=
np.float64(2.219144465985076)
, axis=0
)[source]¶ Computes the Qn robust estimator of scale
The Qn scale estimator is a more efficient alternative to the MAD. The Qn scale estimator of an array a of length n is defined as c * {abs(a[i] - a[j]): i<j}_(k), for k equal to [n/2] + 1 choose 2. Thus, the Qn estimator is the k-th order statistic of the absolute differences of the array. The optional constant is used to normalize the estimate as explained below. The implementation follows the algorithm described in Croux and Rousseeuw (1992).
Last update:
Dec 23, 2024