1.. currentmodule:: statsmodels.robust
2
3
4.. _rlm:
5
6Robust Linear Models
7====================
8
9Robust linear models with support for the M-estimators listed under `Norms`_.
10
11See `Module Reference`_ for commands and arguments.
12
13Examples
14--------
15
16.. ipython:: python
17
18    # Load modules and data
19    import statsmodels.api as sm
20    data = sm.datasets.stackloss.load()
21    data.exog = sm.add_constant(data.exog)
22
23    # Fit model and print summary
24    rlm_model = sm.RLM(data.endog, data.exog, M=sm.robust.norms.HuberT())
25    rlm_results = rlm_model.fit()
26    print(rlm_results.params)
27
28Detailed examples can be found here:
29
30* `Robust Models 1 <examples/notebooks/generated/robust_models_0.html>`__
31* `Robust Models 2 <examples/notebooks/generated/robust_models_1.html>`__
32
33Technical Documentation
34-----------------------
35
36.. toctree::
37   :maxdepth: 1
38
39   rlm_techn1
40
41References
42^^^^^^^^^^
43
44* PJ Huber. ‘Robust Statistics’ John Wiley and Sons, Inc., New York. 1981.
45* PJ Huber. 1973, ‘The 1972 Wald Memorial Lectures: Robust Regression: Asymptotics, Conjectures, and Monte Carlo.’ The Annals of Statistics, 1.5, 799-821.
46* R Venables, B Ripley. ‘Modern Applied Statistics in S’ Springer, New York,
47* C Croux, PJ Rousseeuw, 'Time-efficient algorithms for two highly robust estimators of scale' Computational statistics. Physica, Heidelberg, 1992.
48
49Module Reference
50----------------
51
52.. module:: statsmodels.robust
53
54Model Classes
55^^^^^^^^^^^^^
56
57.. module:: statsmodels.robust.robust_linear_model
58.. currentmodule:: statsmodels.robust.robust_linear_model
59
60.. autosummary::
61   :toctree: generated/
62
63   RLM
64
65Model Results
66^^^^^^^^^^^^^
67
68.. autosummary::
69   :toctree: generated/
70
71   RLMResults
72
73.. _norms:
74
75Norms
76^^^^^
77
78.. module:: statsmodels.robust.norms
79.. currentmodule:: statsmodels.robust.norms
80
81.. autosummary::
82   :toctree: generated/
83
84   AndrewWave
85   Hampel
86   HuberT
87   LeastSquares
88   RamsayE
89   RobustNorm
90   TrimmedMean
91   TukeyBiweight
92   estimate_location
93
94
95Scale
96^^^^^
97
98.. module:: statsmodels.robust.scale
99.. currentmodule:: statsmodels.robust.scale
100
101.. autosummary::
102   :toctree: generated/
103
104    Huber
105    HuberScale
106    mad
107    hubers_scale
108    iqr
109    qn_scale
110