statsmodels.robust.norms.TukeyQuartic#
- class statsmodels.robust.norms.TukeyQuartic(c=3.61752, k=4)[source]#
Variant of Tukey’s biweight function with power 4 for M-estimation
- Parameters:
- c
float,optional The tuning constant for Tukey’s Biweight. It has to be positive. The default value is c = 3.61752.
- k
int,optional The power used in the inner term in place of the power 2 used by Tukey’s biweight. It has to be a positive, even integer, because psi is an odd function only for even powers. The default value is 4.
- c
Methods
__call__(z)Return the value of estimator rho applied to an input
- Raises:
TypeErrorIf c is not a real number, or k is not an integer.
ValueErrorIf c is not positive or is nan, or if k is not positive and even.
Notes
This is a variation of Tukey’s biweight (bisquare) function where the weight function has power 4 instead of power 2 in the inner term.
The default value of c is only valid for
k = 4, it needs to be changed for other powers.Changed in version 0.15.1: The tuning constant c and the power k are validated. Invalid values raise a
TypeErrororValueErrorinstead of creating a degenerate norm.The constants are validated when the norm is created and in
_set_tuning_param. Plain attribute assignment after construction, for examplenorm.c = value, is not validated.Methods
max_rho()psi(z)The psi function of TukeyQuartic norm
psi_deriv(z)The derivative of the TukeyQuartic psi function
rho(z)The robust criterion function for TukeyQuartic norm
weights(z)TukeyQuartic weighting function for the IRLS algorithm
Properties