Robust Linear Models¶
Robust linear models with support for the M-estimators listed under Norms.
See Module Reference for commands and arguments.
Examples¶
# Load modules and data
In [1]: import statsmodels.api as sm
In [2]: data = sm.datasets.stackloss.load(as_pandas=False)
In [3]: data.exog = sm.add_constant(data.exog)
# Fit model and print summary
In [4]: rlm_model = sm.RLM(data.endog, data.exog, M=sm.robust.norms.HuberT())
In [5]: rlm_results = rlm_model.fit()
In [6]: print(rlm_results.params)
[-41.0265 0.8294 0.9261 -0.1278]
Detailed examples can be found here:
Technical Documentation¶
References¶
PJ Huber. ‘Robust Statistics’ John Wiley and Sons, Inc., New York. 1981.
PJ Huber. 1973, ‘The 1972 Wald Memorial Lectures: Robust Regression: Asymptotics, Conjectures, and Monte Carlo.’ The Annals of Statistics, 1.5, 799-821.
R Venables, B Ripley. ‘Modern Applied Statistics in S’ Springer, New York,
Module Reference¶
Model Results¶
|
Class to contain RLM results |
Norms¶
|
Andrew’s wave for M estimation. |
|
Hampel function for M-estimation. |
|
Huber’s T for M estimation. |
Least squares rho for M-estimation and its derived functions. |
|
|
Ramsay’s Ea for M estimation. |
The parent class for the norms used for robust regression. |
|
|
Trimmed mean function for M-estimation. |
|
Tukey’s biweight function for M-estimation. |
|
M-estimator of location using self.norm and a current estimator of scale. |
Scale¶
|
Huber’s proposal 2 for estimating location and scale jointly. |
|
Huber’s scaling for fitting robust linear models. |
|
The Median Absolute Deviation along given axis of an array |
Huber’s scaling for fitting robust linear models. |