statsmodels.robust.norms.TukeyBiweight.weights#

TukeyBiweight.weights(z)[source]#

Tukey’s biweight weighting function for the IRLS algorithm

The psi function scaled by z.

Parameters:
zarray_like

1d array

Returns:
weightsndarray

The value of the weighting function.

\[\begin{split}\text{weights}(z) = \begin{cases} (1 - (\frac{z}{c})^2)^2 & \text{if } \lvert z \rvert \le c \\ 0 & \text{if } \lvert z \rvert > c \end{cases}\end{split}\]