Created
August 26, 2012 23:28
-
-
Save vincentarelbundock/3484337 to your computer and use it in GitHub Desktop.
Statsmodels example: Ordinary least squares regression
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"name": "example_ols" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Ordinary least squares" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"import numpy as np\n", | |
"import statsmodels.api as sm\n", | |
"import matplotlib\n", | |
"import matplotlib.pyplot as plt\n", | |
"from statsmodels.sandbox.regression.predstd import wls_prediction_std\n", | |
"np.random.seed(9876789)" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [], | |
"prompt_number": 1 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## OLS estimation\n", | |
"\n", | |
"Artificial data:" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"nsample = 100\n", | |
"x = np.linspace(0, 10, 100)\n", | |
"X = np.column_stack((x, x**2))\n", | |
"beta = np.array([1, 0.1, 10])\n", | |
"e = np.random.normal(size=nsample)" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [], | |
"prompt_number": 2 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Our model needs an intercept so we add a column of 1s:" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"X = sm.add_constant(X)\n", | |
"y = np.dot(X, beta) + e" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"stream": "stderr", | |
"text": [ | |
"/usr/local/lib/python2.7/dist-packages/statsmodels-0.5.0-py2.7-linux-x86_64.egg/statsmodels/tools/tools.py:306: FutureWarning: The default of `prepend` will be changed to True in 0.5.0, use explicit prepend\n", | |
" FutureWarning)\n" | |
] | |
} | |
], | |
"prompt_number": 3 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Inspect data:" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"X = sm.add_constant(X)\n", | |
"y = np.dot(X, beta) + e" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [], | |
"prompt_number": 4 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Fit and summary:" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"model = sm.OLS(y, X)\n", | |
"results = model.fit()\n", | |
"print results.summary()" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"stream": "stdout", | |
"text": [ | |
" OLS Regression Results \n", | |
"==============================================================================\n", | |
"Dep. Variable: y R-squared: 0.968\n", | |
"Model: OLS Adj. R-squared: 0.968\n", | |
"Method: Least Squares F-statistic: 1479.\n", | |
"Date: Sun, 26 Aug 2012 Prob (F-statistic): 2.19e-73\n", | |
"Time: 20:52:52 Log-Likelihood: -146.51\n", | |
"No. Observations: 100 AIC: 299.0\n", | |
"Df Residuals: 97 BIC: 306.8\n", | |
"Df Model: 2 \n", | |
"==============================================================================\n", | |
" coef std err t P>|t| [95.0% Conf. Int.]\n", | |
"------------------------------------------------------------------------------\n", | |
"x1 0.8598 0.145 5.948 0.000 0.573 1.147\n", | |
"x2 0.1103 0.014 7.883 0.000 0.082 0.138\n", | |
"const 10.3423 0.313 33.072 0.000 9.722 10.963\n", | |
"==============================================================================\n", | |
"Omnibus: 2.042 Durbin-Watson: 2.274\n", | |
"Prob(Omnibus): 0.360 Jarque-Bera (JB): 1.875\n", | |
"Skew: 0.234 Prob(JB): 0.392\n", | |
"Kurtosis: 2.519 Cond. No. 144.\n", | |
"==============================================================================\n" | |
] | |
} | |
], | |
"prompt_number": 5 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Quantities of interest can be extracted directly from the fitted model. Type ``dir(results)`` for a full list. Here are some examples: " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"print 'Parameters: ', results.params\n", | |
"print 'R2: ', results.rsquared" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"stream": "stdout", | |
"text": [ | |
"Parameters: [ 0.85975052 0.11025357 10.34233516]\n", | |
"R2: 0.968242518536\n" | |
] | |
} | |
], | |
"prompt_number": 6 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## OLS non-linear curve but linear in parameters\n", | |
"\n", | |
"We simulate artificial data with a non-linear relationship between x and y:" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"nsample = 50\n", | |
"sig = 0.5\n", | |
"x = np.linspace(0, 20, nsample)\n", | |
"X = np.c_[x, np.sin(x), (x-5)**2, np.ones(nsample)]\n", | |
"beta = [0.5, 0.5, -0.02, 5.]\n", | |
"y_true = np.dot(X, beta)\n", | |
"y = y_true + sig * np.random.normal(size=nsample)" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [], | |
"prompt_number": 7 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Fit and summary:" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"res = sm.OLS(y, X).fit()\n", | |
"print res.summary()" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"stream": "stdout", | |
"text": [ | |
" OLS Regression Results \n", | |
"==============================================================================\n", | |
"Dep. Variable: y R-squared: 0.933\n", | |
"Model: OLS Adj. R-squared: 0.928\n", | |
"Method: Least Squares F-statistic: 211.8\n", | |
"Date: Sun, 26 Aug 2012 Prob (F-statistic): 6.30e-27\n", | |
"Time: 20:52:52 Log-Likelihood: -34.438\n", | |
"No. Observations: 50 AIC: 76.88\n", | |
"Df Residuals: 46 BIC: 84.52\n", | |
"Df Model: 3 \n", | |
"==============================================================================\n", | |
" coef std err t P>|t| [95.0% Conf. Int.]\n", | |
"------------------------------------------------------------------------------\n", | |
"x1 0.4687 0.026 17.751 0.000 0.416 0.522\n", | |
"x2 0.4836 0.104 4.659 0.000 0.275 0.693\n", | |
"x3 -0.0174 0.002 -7.507 0.000 -0.022 -0.013\n", | |
"const 5.2058 0.171 30.405 0.000 4.861 5.550\n", | |
"==============================================================================\n", | |
"Omnibus: 0.655 Durbin-Watson: 2.896\n", | |
"Prob(Omnibus): 0.721 Jarque-Bera (JB): 0.360\n", | |
"Skew: 0.207 Prob(JB): 0.835\n", | |
"Kurtosis: 3.026 Cond. No. 221.\n", | |
"==============================================================================\n" | |
] | |
} | |
], | |
"prompt_number": 8 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Extract other quantities of interest:" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"print 'Parameters: ', res.params\n", | |
"print 'Standard errors: ', res.bse\n", | |
"print 'Predicted values: ', res.predict()" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"stream": "stdout", | |
"text": [ | |
"Parameters: [ 0.46872448 0.48360119 -0.01740479 5.20584496]\n", | |
"Standard errors: [ 0.02640602 0.10380518 0.00231847 0.17121765]\n", | |
"Predicted values: [ 4.77072516 5.22213464 5.63620761 5.98658823 6.25643234\n", | |
" 6.44117491 6.54928009 6.60085051 6.62432454 6.6518039\n", | |
" 6.71377946 6.83412169 7.02615877 7.29048685 7.61487206\n", | |
" 7.97626054 8.34456611 8.68761335 8.97642389 9.18997755\n", | |
" 9.31866582 9.36587056 9.34740836 9.28893189 9.22171529\n", | |
" 9.17751587 9.1833565 9.25708583 9.40444579 9.61812821\n", | |
" 9.87897556 10.15912843 10.42660281 10.65054491 10.8063004\n", | |
" 10.87946503 10.86825119 10.78378163 10.64826203 10.49133265\n", | |
" 10.34519853 10.23933827 10.19566084 10.22490593 10.32487947\n", | |
" 10.48081414 10.66779556 10.85485568 11.01006072 11.10575781]\n" | |
] | |
} | |
], | |
"prompt_number": 9 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Draw a plot to compare the true relationship to OLS predictions. Confidence intervals around the predictions are built using the ``wls_prediction_std`` command." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"plt.figure()\n", | |
"plt.plot(x, y, 'o', x, y_true, 'b-')\n", | |
"prstd, iv_l, iv_u = wls_prediction_std(res)\n", | |
"plt.plot(x, res.fittedvalues, 'r--.')\n", | |
"plt.plot(x, iv_u, 'r--')\n", | |
"plt.plot(x, iv_l, 'r--')\n", | |
"plt.title('blue: true, red: OLS')" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"output_type": "pyout", | |
"prompt_number": 10, | |
"text": [ | |
"<matplotlib.text.Text at 0x469b110>" | |
] | |
}, | |
{ | |
"output_type": "display_data", | |
"png": "iVBORw0KGgoAAAANSUhEUgAAAXEAAAEICAYAAACpqsStAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlYlFX7B/AvIiKoCIYiCYqiKKKAC2qaQsninqmYS2pu\nmOXSpr8SFypNM99S0XrTNDH3pUxBETdw316XyA0FV1BTGBBkZ+7fHydG0WF75pkN7s91zZXOPHOe\nw0g3h3Pucx8TIiIwxhgzSlX03QHGGGPScRBnjDEjxkGcMcaMGAdxxhgzYhzEGWPMiHEQZ4wxI8ZB\nvJJzcnLCgQMH1L4WHR0NR0dHHfeoYgoJCcGIESP03Q1WAXEQr+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Fi1btsRHH32ker7c358k\ns927d5OLiws5OzvTN998I3fzlUpCQgJ5eHiQh4cHubm58ecpwZAhQ8je3p7MzMzIwcGBVq9eTcnJ\nydS9e3dq1qwZ+fn5kUKh0Hc3jcKLn+WqVatoxIgR1Lp1a3J3d6e33nqLHjx4oO9uGo0jR46QiYkJ\neXh4kKenJ3l6etKePXvK/f2plQJYjDHGdIN3bDLGmBHjIM4YY0aMgzhjjBkxDuKMMWbEOIgzxpgR\n4yDOGGNG7P8B67fYe1VTegIAAAAASUVORK5CYII=\n" | |
} | |
], | |
"prompt_number": 10 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## OLS with dummy variables\n", | |
"\n", | |
"We generate some artificial data. There are 3 groups which will be modelled using dummy variables. Group 0 is the omitted/benchmark category." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"nsample = 50\n", | |
"groups = np.zeros(nsample, int)\n", | |
"groups[20:40] = 1\n", | |
"groups[40:] = 2\n", | |
"dummy = (groups[:,None] == np.unique(groups)).astype(float)\n", | |
"x = np.linspace(0, 20, nsample)\n", | |
"X = np.c_[x, dummy[:,1:], np.ones(nsample)]\n", | |
"beta = [1., 3, -3, 10]\n", | |
"y_true = np.dot(X, beta)\n", | |
"e = np.random.normal(size=nsample)\n", | |
"y = y_true + e" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [], | |
"prompt_number": 11 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Inspect the data:" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"print X[:5,:]\n", | |
"print y[:5]\n", | |
"print groups\n", | |
"print dummy[:5,:]" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"stream": "stdout", | |
"text": [ | |
"[[ 0. 0. 0. 1. ]\n", | |
" [ 0.40816327 0. 0. 1. ]\n", | |
" [ 0.81632653 0. 0. 1. ]\n", | |
" [ 1.2244898 0. 0. 1. ]\n", | |
" [ 1.63265306 0. 0. 1. ]]\n", | |
"[ 9.28223335 10.50481865 11.84389206 10.38508408 12.37941998]\n", | |
"[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n", | |
" 1 1 1 2 2 2 2 2 2 2 2 2 2]\n", | |
"[[ 1. 0. 0.]\n", | |
" [ 1. 0. 0.]\n", | |
" [ 1. 0. 0.]\n", | |
" [ 1. 0. 0.]\n", | |
" [ 1. 0. 0.]]\n" | |
] | |
} | |
], | |
"prompt_number": 12 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Fit and summary:" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"res2 = sm.OLS(y, X).fit()\n", | |
"print res.summary()" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"stream": "stdout", | |
"text": [ | |
" OLS Regression Results \n", | |
"==============================================================================\n", | |
"Dep. Variable: y R-squared: 0.933\n", | |
"Model: OLS Adj. R-squared: 0.928\n", | |
"Method: Least Squares F-statistic: 211.8\n", | |
"Date: Sun, 26 Aug 2012 Prob (F-statistic): 6.30e-27\n", | |
"Time: 20:52:53 Log-Likelihood: -34.438\n", | |
"No. Observations: 50 AIC: 76.88\n", | |
"Df Residuals: 46 BIC: 84.52\n", | |
"Df Model: 3 \n", | |
"==============================================================================\n", | |
" coef std err t P>|t| [95.0% Conf. Int.]\n", | |
"------------------------------------------------------------------------------\n", | |
"x1 0.4687 0.026 17.751 0.000 0.416 0.522\n", | |
"x2 0.4836 0.104 4.659 0.000 0.275 0.693\n", | |
"x3 -0.0174 0.002 -7.507 0.000 -0.022 -0.013\n", | |
"const 5.2058 0.171 30.405 0.000 4.861 5.550\n", | |
"==============================================================================\n", | |
"Omnibus: 0.655 Durbin-Watson: 2.896\n", | |
"Prob(Omnibus): 0.721 Jarque-Bera (JB): 0.360\n", | |
"Skew: 0.207 Prob(JB): 0.835\n", | |
"Kurtosis: 3.026 Cond. No. 221.\n", | |
"==============================================================================\n" | |
] | |
} | |
], | |
"prompt_number": 13 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Draw a plot to compare the true relationship to OLS predictions:" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"prstd, iv_l, iv_u = wls_prediction_std(res2)\n", | |
"plt.figure()\n", | |
"plt.plot(x, y, 'o', x, y_true, 'b-')\n", | |
"plt.plot(x, res2.fittedvalues, 'r--.')\n", | |
"plt.plot(x, iv_u, 'r--')\n", | |
"plt.plot(x, iv_l, 'r--')\n", | |
"plt.title('blue: true, red: OLS')" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"output_type": "pyout", | |
"prompt_number": 14, | |
"text": [ | |
"<matplotlib.text.Text at 0x46d2bd0>" | |
] | |
}, | |
{ | |
"output_type": "display_data", | |
"png": "iVBORw0KGgoAAAANSUhEUgAAAXIAAAEICAYAAABCnX+uAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X18zeX/wPHXYWNmYxNmbseYe6aIymwqGxYqTUVLxKQb\npPQtN1lJJBJLhe4mqagUxkyykR9JptyGuR9bZhtjdnuu3x8fm812trOzc7ad7f18PM7Dds7nc32u\nc868z3Wum/elU0ophBBCWK1q5V0BIYQQpSOBXAghrJwEciGEsHISyIUQwspJIBdCCCsngVwIIayc\nBPIqzs3Nja1btxb6WGRkJM2aNSvjGlVOwcHBBAYGlnc1RCUlgbyK0+l06HS68q4G1apV4+TJk+Vd\nDYsp6WucnJzM+PHjcXV1pXbt2nTp0oWvvvoq3zFFfQi/++67tGrVCkdHR5o1a8YTTzxhatWFFbAp\n7woIkaOotWlZWV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eXkzNePjo6WcQgTjBo1qkBgmTt3Lv369ePYsWM88MAD\nzJ07t5xqZ30Kez11Oh2TJ08mOjqa6Oho+vfvX061sy62trYsXLiQQ4cOsXv3bpYsWcKRI0dM+vs0\nayDfs2cPrVu3xs3NDVtbW5544gl++eUXc16iSpJZQKbz8vLC2dk5333r1q1j5MiRAIwcOZKff/65\nPKpmlQp7PUH+Rk3RqFEjPD09AXBwcKB9+/bExsaa9Pdp1kAeGxtLs2bNcn9v2rQpsbGx5rxElaPT\n6SbOzs4AAAHrSURBVHjwwQfp3r07y5cvL+/qVArx8fG4uLgA4OLiQnx8fDnXyPqFhITQtWtXnn32\nWemqMsHp06eJjo6mZ8+eJv19mjWQy0Ig89u5cyfR0dFs2rSJJUuWsGPHjvKuUqWi0+nk77aUxo8f\nz6lTp9i/fz+urq688sor5V0lq3Lt2jWGDh3KokWLcHR0zPeYsX+fZg3kTZo04dy5c7m/nzt3jqZN\nm5rzElWOzNc3PxcXF+Li4gC4ePEiDRs2LOcaWbeGDRvmBpwxY8bI32gJZGZmMnToUAIDA3n44YcB\n0/4+zRrIu3fvzvHjxzl9+jQZGRl8//33DB482JyXqFJkvr5lDB48mNDQUABCQ0Nz/wMJ01y8eDH3\n57Vr18rfqJGUUjz77LN06NCBSZMm5d5v0t+nMrONGzcqDw8P5e7urt59911zF1+lnDx5UnXt2lV1\n7dpVdezYUV5PEzzxxBPK1dVV2draqqZNm6ovvvhCXb58WT3wwAOqTZs2ql+/fiopKam8q2k1bn89\nP//8cxUYGKg6d+6sunTpooYMGaLi4uLKu5pWYceOHUqn06muXbsqT09P5enpqTZt2mTS36fJSbOE\nEEJUDLJDkBBCWDkJ5EIIYeUkkAshhJWTQC6EEFZOArkQQlg5CeRCCGHl/h96a7tFOscRjAAAAABJ\nRU5ErkJggg==\n" | |
} | |
], | |
"prompt_number": 14 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Joint hypothesis test\n", | |
"\n", | |
"### F test\n", | |
"\n", | |
"We want to test the hypothesis that both coefficients on the dummy variables are equal to zero, that is, $R \\times \\beta = 0$. An F test leads us to strongly reject the null hypothesis of identical constant in the 3 groups:" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"R = [[0, 1, 0, 0], [0, 0, 1, 0]]\n", | |
"print np.array(R)\n", | |
"print res2.f_test(R)" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"stream": "stdout", | |
"text": [ | |
"[[0 1 0 0]\n", | |
" [0 0 1 0]]\n", | |
"<F test: F=array([[ 145.49268198]]), p=[[ 0.]], df_denom=46, df_num=2>\n" | |
] | |
} | |
], | |
"prompt_number": 15 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Small group effects\n", | |
"\n", | |
"If we generate artificial data with smaller group effects, the T test can no longer reject the Null hypothesis: " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"beta = [1., 0.3, -0.0, 10]\n", | |
"y_true = np.dot(X, beta)\n", | |
"y = y_true + np.random.normal(size=nsample)\n", | |
"res3 = sm.OLS(y, X).fit()\n", | |
"print res3.f_test(R)" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"stream": "stdout", | |
"text": [ | |
"<F test: F=array([[ 1.22491119]]), p=[[ 0.30318644]], df_denom=46, df_num=2>\n" | |
] | |
} | |
], | |
"prompt_number": 16 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Multicollinearity\n", | |
"\n", | |
"The Longley dataset is well known to have high multicollinearity, that is, the exogenous predictors are highly correlated. This is problematic because it can affect the stability of our coefficient estimates as we make minor changes to model specification. " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"from statsmodels.datasets.longley import load\n", | |
"y = load().endog\n", | |
"X = load().exog\n", | |
"X = sm.tools.add_constant(X)" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [], | |
"prompt_number": 17 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Fit and summary:" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"ols_model = sm.OLS(y, X)\n", | |
"ols_results = ols_model.fit()\n", | |
"print ols_results.summary()" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"stream": "stdout", | |
"text": [ | |
" OLS Regression Results \n", | |
"==============================================================================\n", | |
"Dep. Variable: y R-squared: 0.995\n", | |
"Model: OLS Adj. R-squared: 0.992\n", | |
"Method: Least Squares F-statistic: 330.3\n", | |
"Date: Sun, 26 Aug 2012 Prob (F-statistic): 4.98e-10\n", | |
"Time: 20:52:53 Log-Likelihood: -109.62\n", | |
"No. Observations: 16 AIC: 233.2\n", | |
"Df Residuals: 9 BIC: 238.6\n", | |
"Df Model: 6 \n", | |
"==============================================================================\n", | |
" coef std err t P>|t| [95.0% Conf. Int.]\n", | |
"------------------------------------------------------------------------------\n", | |
"x1 15.0619 84.915 0.177 0.863 -177.029 207.153\n", | |
"x2 -0.0358 0.033 -1.070 0.313 -0.112 0.040\n", | |
"x3 -2.0202 0.488 -4.136 0.003 -3.125 -0.915\n", | |
"x4 -1.0332 0.214 -4.822 0.001 -1.518 -0.549\n", | |
"x5 -0.0511 0.226 -0.226 0.826 -0.563 0.460\n", | |
"x6 1829.1515 455.478 4.016 0.003 798.788 2859.515\n", | |
"const -3.482e+06 8.9e+05 -3.911 0.004 -5.5e+06 -1.47e+06\n", | |
"==============================================================================\n", | |
"Omnibus: 0.749 Durbin-Watson: 2.559\n", | |
"Prob(Omnibus): 0.688 Jarque-Bera (JB): 0.684\n", | |
"Skew: 0.420 Prob(JB): 0.710\n", | |
"Kurtosis: 2.434 Cond. No. 4.86e+09\n", | |
"==============================================================================\n", | |
"\n", | |
"The condition number is large, 4.86e+09. This might indicate that there are\n", | |
"strong multicollinearity or other numerical problems.\n" | |
] | |
}, | |
{ | |
"output_type": "stream", | |
"stream": "stderr", | |
"text": [ | |
"/usr/local/lib/python2.7/dist-packages/scipy/stats/stats.py:1199: UserWarning: kurtosistest only valid for n>=20 ... continuing anyway, n=16\n", | |
" int(n))\n" | |
] | |
} | |
], | |
"prompt_number": 18 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"#### Condition number\n", | |
"\n", | |
"One way to assess multicollinearity is to compute the condition number. Values over 20 are worrisome (see Greene 4.9). The first step is to normalize the independent variables to have unit length: " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"norm_x = np.ones_like(X)\n", | |
"for i in range(int(ols_model.df_model)):\n", | |
" norm_x[:,i] = X[:,i]/np.linalg.norm(X[:,i])\n", | |
"norm_xtx = np.dot(norm_x.T,norm_x)" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [], | |
"prompt_number": 19 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Then, we take the square root of the ratio of the biggest to the smallest eigen values. " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"eigs = np.linalg.eigvals(norm_xtx)\n", | |
"condition_number = np.sqrt(eigs.max() / eigs.min())\n", | |
"print condition_number" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"stream": "stdout", | |
"text": [ | |
"56240.8699497\n" | |
] | |
} | |
], | |
"prompt_number": 20 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"#### Dropping an observation\n", | |
"\n", | |
"Greene also points out that dropping a single observation can have a dramatic effect on the coefficient estimates: " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"ols_results2 = sm.OLS(y[:-1], X[:-1,:]).fit()\n", | |
"print \"Percentage change %4.2f%%\\n\"*7 % tuple([i for i in ols_results.params/ols_results2.params*100 - 100])" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"stream": "stdout", | |
"text": [ | |
"Percentage change -173.43%\n", | |
"Percentage change 31.04%\n", | |
"Percentage change 3.48%\n", | |
"Percentage change 7.83%\n", | |
"Percentage change -199.54%\n", | |
"Percentage change 15.39%\n", | |
"Percentage change 15.40%\n", | |
"\n" | |
] | |
} | |
], | |
"prompt_number": 21 | |
} | |
], | |
"metadata": {} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment