statsmodels.robust.norms.TrimmedMean#

class statsmodels.robust.norms.TrimmedMean(c=2.0)[source]#

Trimmed mean function for M-estimation

Parameters:
cfloat, optional

The tuning constant for the trimmed mean function. It has to be positive. The default value is 2.0.

Methods

__call__(z)

Return the value of estimator rho applied to an input

Raises:
TypeError

If c is not a real number.

ValueError

If c is not positive, or is nan.

Notes

Changed in version 0.15.1: The tuning constant is validated. Zero, negative and nan values raise a ValueError instead of creating a degenerate norm.

The tuning constant is validated when the norm is created and in _set_tuning_param. Plain attribute assignment after construction, norm.c = value, is not validated.

Methods

max_rho()

psi(z)

The psi function for least trimmed mean

psi_deriv(z)

The derivative of least trimmed mean psi function

rho(z)

The robust criterion function for least trimmed mean

weights(z)

Least trimmed mean weighting function for the IRLS algorithm

Properties