statsmodels.robust.norms.Hampel.psi

Hampel.psi(z)[source]

The psi function for Hampel’s estimator

The analytic derivative of rho

Parameters
zarray_like

1d array

Returns
psindarray

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