statsmodels.robust.scale.hubers_scale

statsmodels.robust.scale.hubers_scale = <statsmodels.robust.scale.HuberScale object>

Huber’s scaling for fitting robust linear models.

Huber’s scale is intended to be used as the scale estimate in the IRLS algorithm and is slightly different than the Huber class.

Parameters:
dfloat, optional

d is the tuning constant for Huber’s scale. Default is 2.5

tolfloat, optional

The convergence tolerance

maxiterint, optiona

The maximum number of iterations. The default is 30.

Methods

call

Return’s Huber’s scale computed as below

Notes

Huber’s scale is the iterative solution to

scale_(i+1)**2 = 1/(n*h)*sum(chi(r/sigma_i)*sigma_i**2

where the Huber function is

chi(x) = (x**2)/2 for |x| < d chi(x) = (d**2)/2 for |x| >= d

and the Huber constant h = (n-p)/n*(d**2 + (1-d**2)* scipy.stats.norm.cdf(d) - .5 - d*sqrt(2*pi)*exp(-0.5*d**2)


Last update: Oct 12, 2024