statsmodels.robust.norms.StudentT#

class statsmodels.robust.norms.StudentT(c=2.3849, df=4)[source]#

Robust norm based on t distribution

Rho is a rescaled version of the t-loglikelihood function after dropping constant terms. The norms are rescaled so that the largest weights are 1 and the second derivative of the rho function at zero is equal to 1.

The maximum likelihood estimator based on the loglikelihood function of the t-distribution is available in statsmodels.miscmodels, which can be used to also estimate scale and degrees of freedom by MLE.

Parameters:
cfloat, optional

The tuning constant for the StudentT norm. It has to be positive. The default value is 2.3849.

dffloat, optional

The degrees of freedom of the t distribution used to derive the norm. It has to be positive. The default value is 4.

Methods

__call__(z)

Return the value of estimator rho applied to an input

Raises:
TypeError

If c or df is not a real number.

ValueError

If c or df is not positive, or is nan.

Notes

Changed in version 0.15.1: The constants c and df are validated. Zero, negative and nan values raise a ValueError instead 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 example norm.c = value, is not validated.

Methods

max_rho()

psi(z)

The psi function of the StudentT norm

psi_deriv(z)

The derivative of the psi function of the StudentT norm

rho(z)

The rho function of the StudentT norm

weights(z)

The weighting function for the IRLS algorithm of the StudentT norm

Properties