statsmodels.robust.norms.Hampel.rho

Hampel.rho(z)[source]

The robust criterion function for Hampel’s estimator.

\[\begin{split}\rho(z) = \begin{cases} \frac{1}{2} z^2 & \text{for } |z| \le a \\ a|z| - \frac{1}{2} a^2 & \text{for } a < |z| \le b \\ \frac{a(c - |z|)^2}{2(c - b)} & \text{for } b < |z| \le c \\ \frac{a(b + c - a)}{2} & \text{for } |z| > c \end{cases}\end{split}\]
Parameters:
zarray_like

1d array

Returns:
rhondarray

The value of the robust criterion function.