robust.scale.Huber()

statsmodels.robust.scale.Huber

class statsmodels.robust.scale.Huber(c=1.5, tol=1e-08, maxiter=30, norm=None) [source]

Huber?s proposal 2 for estimating location and scale jointly.

Parameters:

c : float, optional

Threshold used in threshold for chi=psi**2. Default value is 1.5.

tol : float, optional

Tolerance for convergence. Default value is 1e-08.

maxiter : int, optional0

Maximum number of iterations. Default value is 30.

norm : statsmodels.robust.norms.RobustNorm, optional

A robust norm used in M estimator of location. If None, the location estimator defaults to a one-step fixed point version of the M-estimator using Huber?s T.

call :

Return joint estimates of Huber?s scale and location.

Examples

>>> import numpy as np
>>> import statsmodels.api as sm
>>> chem_data = np.array([2.20, 2.20, 2.4, 2.4, 2.5, 2.7, 2.8, 2.9, 3.03,
...        3.03, 3.10, 3.37, 3.4, 3.4, 3.4, 3.5, 3.6, 3.7, 3.7, 3.7, 3.7,
...        3.77, 5.28, 28.95])
>>> sm.robust.scale.huber(chem_data)
(array(3.2054980819923693), array(0.67365260010478967))

Methods

doc_statsmodels
2017-01-18 16:15:20
Comments
Leave a Comment

Please login to continue.