statsmodels.robust.norms.Hampel.psi

Hampel.psi(z)[source]

The psi function for Hampel’s estimator

The analytic derivative of rho

Parameters:

z : array-like

1d array

Returns:

psi : array

psi(z) = z for |z| <= a

psi(z) = a*sign(z) for a < |z| <= b

psi(z) = a*sign(z)*(c - |z|)/(c-b) for b < |z| <= c

psi(z) = 0 for |z| > c