statsmodels.robust.norms.HuberT.weights

HuberT.weights(z)[source]

Huber’s t weighting function for the IRLS algorithm.

The psi function scaled by z.

\[\begin{split}w(z) = \begin{cases} 1 & \text{for } |z| \le t \\ t/|z| & \text{for } |z| > t \end{cases}\end{split}\]
Parameters:
zarray_like

1d array

Returns:
weightsndarray

The value of the weighting function.