File: rlm.rst

package info (click to toggle)
statsmodels 0.14.6%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 49,956 kB
  • sloc: python: 254,365; f90: 612; sh: 560; javascript: 337; asm: 156; makefile: 145; ansic: 32; xml: 9
file content (110 lines) | stat: -rw-r--r-- 2,201 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
.. currentmodule:: statsmodels.robust


.. _rlm:

Robust Linear Models
====================

Robust linear models with support for the M-estimators listed under `Norms`_.

See `Module Reference`_ for commands and arguments.

Examples
--------

.. ipython:: python

    # Load modules and data
    import statsmodels.api as sm
    data = sm.datasets.stackloss.load()
    data.exog = sm.add_constant(data.exog)

    # Fit model and print summary
    rlm_model = sm.RLM(data.endog, data.exog, M=sm.robust.norms.HuberT())
    rlm_results = rlm_model.fit()
    print(rlm_results.params)

Detailed examples can be found here:

* `Robust Models 1 <examples/notebooks/generated/robust_models_0.ipynb>`_
* `Robust Models 2 <examples/notebooks/generated/robust_models_1.ipynb>`_

Technical Documentation
-----------------------

.. toctree::
   :maxdepth: 1

   rlm_techn1

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,
* C Croux, PJ Rousseeuw, 'Time-efficient algorithms for two highly robust estimators of scale' Computational statistics. Physica, Heidelberg, 1992.

Module Reference
----------------

.. module:: statsmodels.robust

Model Classes
^^^^^^^^^^^^^

.. module:: statsmodels.robust.robust_linear_model
.. currentmodule:: statsmodels.robust.robust_linear_model

.. autosummary::
   :toctree: generated/

   RLM

Model Results
^^^^^^^^^^^^^

.. autosummary::
   :toctree: generated/

   RLMResults

.. _norms:

Norms
^^^^^

.. module:: statsmodels.robust.norms
.. currentmodule:: statsmodels.robust.norms

.. autosummary::
   :toctree: generated/

   AndrewWave
   Hampel
   HuberT
   LeastSquares
   MQuantileNorm
   RamsayE
   RobustNorm
   TrimmedMean
   TukeyBiweight
   estimate_location


Scale
^^^^^

.. module:: statsmodels.robust.scale
.. currentmodule:: statsmodels.robust.scale

.. autosummary::
   :toctree: generated/

    Huber
    HuberScale
    mad
    hubers_scale
    iqr
    qn_scale