Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/master/pydata/OLSvsRLM.sagews
Views: 968
OLS vs RLM
The following shows a comparison between ordinary least squares and a robust linear model in statsmodels.
True: [ 3.1415 0.7654321]
OLS: [ 3.18771324 0.54335458] (0.22683)
RLS: [ 3.1702073 0.73458569] (0.04214)
Robust linear Model Regression Results
==============================================================================
Dep. Variable: y No. Observations: 100
Model: RLM Df Residuals: 98
Method: IRLS Df Model: 1
Norm: HuberT
Scale Est.: mad
Cov Type: H1
Date: Sun, 11 Aug 2013
Time: 10:07:26
No. Iterations: 29
==============================================================================
coef std err z P>|z| [95.0% Conf. Int.]
------------------------------------------------------------------------------
const 3.1702 0.025 126.952 0.000 3.121 3.219
x1 0.7346 0.008 97.298 0.000 0.720 0.749
==============================================================================
If the model instance has been used for another fit with different fit
parameters, then the fit options might not be the correct ones anymore .
