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.
- c
Methods
__call__
(a[, mu, initscale, axis])Compute Huber's proposal 2 estimate of scale, using an optional initial value of scale and an optional estimate of mu.
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
Last update:
Dec 23, 2024