MLstuff/ISLR/notebooks/3.6.2.R.ipynb

2141 lines
1.9 MiB
Plaintext
Raw Normal View History

2020-03-28 01:06:31 +00:00
{
"cells": [
{
"cell_type": "code",
2020-08-01 22:25:45 +00:00
"execution_count": 1,
2020-03-28 01:06:31 +00:00
"metadata": {},
"outputs": [],
"source": [
"library(MASS)"
]
},
2020-08-01 22:25:45 +00:00
{
"cell_type": "markdown",
"metadata": {},
"source": [
"`symmary(model)` reports basic statistics"
]
},
2020-03-28 01:06:31 +00:00
{
"cell_type": "code",
2020-08-01 22:25:45 +00:00
"execution_count": 15,
2020-03-28 01:06:31 +00:00
"metadata": {},
"outputs": [
{
"data": {
2020-08-01 22:25:45 +00:00
"text/plain": [
2020-03-28 01:06:31 +00:00
"\n",
2020-08-01 22:25:45 +00:00
"Call:\n",
"lm(formula = medv ~ lstat, data = Boston)\n",
2020-03-28 01:06:31 +00:00
"\n",
2020-08-01 22:25:45 +00:00
"Residuals:\n",
" Min 1Q Median 3Q Max \n",
"-15.168 -3.990 -1.318 2.034 24.500 \n",
2020-03-28 01:06:31 +00:00
"\n",
2020-08-01 22:25:45 +00:00
"Coefficients:\n",
" Estimate Std. Error t value Pr(>|t|) \n",
"(Intercept) 34.55384 0.56263 61.41 <2e-16 ***\n",
"lstat -0.95005 0.03873 -24.53 <2e-16 ***\n",
"---\n",
"Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1\n",
2020-03-28 01:06:31 +00:00
"\n",
2020-08-01 22:25:45 +00:00
"Residual standard error: 6.216 on 504 degrees of freedom\n",
"Multiple R-squared: 0.5441,\tAdjusted R-squared: 0.5432 \n",
"F-statistic: 601.6 on 1 and 504 DF, p-value: < 2.2e-16\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<style>\n",
".list-inline {list-style: none; margin:0; padding: 0}\n",
".list-inline>li {display: inline-block}\n",
".list-inline>li:not(:last-child)::after {content: \"\\00b7\"; padding: 0 .5ex}\n",
"</style>\n",
"<ol class=list-inline><li>'coefficients'</li><li>'residuals'</li><li>'effects'</li><li>'rank'</li><li>'fitted.values'</li><li>'assign'</li><li>'qr'</li><li>'df.residual'</li><li>'xlevels'</li><li>'call'</li><li>'terms'</li><li>'model'</li></ol>\n"
2020-03-28 01:06:31 +00:00
],
"text/latex": [
2020-08-01 22:25:45 +00:00
"\\begin{enumerate*}\n",
"\\item 'coefficients'\n",
"\\item 'residuals'\n",
"\\item 'effects'\n",
"\\item 'rank'\n",
"\\item 'fitted.values'\n",
"\\item 'assign'\n",
"\\item 'qr'\n",
"\\item 'df.residual'\n",
"\\item 'xlevels'\n",
"\\item 'call'\n",
"\\item 'terms'\n",
"\\item 'model'\n",
"\\end{enumerate*}\n"
],
"text/markdown": [
"1. 'coefficients'\n",
"2. 'residuals'\n",
"3. 'effects'\n",
"4. 'rank'\n",
"5. 'fitted.values'\n",
"6. 'assign'\n",
"7. 'qr'\n",
"8. 'df.residual'\n",
"9. 'xlevels'\n",
"10. 'call'\n",
"11. 'terms'\n",
"12. 'model'\n",
2020-03-28 01:06:31 +00:00
"\n",
2020-08-01 22:25:45 +00:00
"\n"
2020-03-28 01:06:31 +00:00
],
"text/plain": [
2020-08-01 22:25:45 +00:00
" [1] \"coefficients\" \"residuals\" \"effects\" \"rank\" \n",
" [5] \"fitted.values\" \"assign\" \"qr\" \"df.residual\" \n",
" [9] \"xlevels\" \"call\" \"terms\" \"model\" "
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<style>\n",
".dl-inline {width: auto; margin:0; padding: 0}\n",
".dl-inline>dt, .dl-inline>dd {float: none; width: auto; display: inline-block}\n",
".dl-inline>dt::after {content: \":\\0020\"; padding-right: .5ex}\n",
".dl-inline>dt:not(:first-of-type) {padding-left: .5ex}\n",
"</style><dl class=dl-inline><dt>(Intercept)</dt><dd>34.5538408793831</dd><dt>lstat</dt><dd>-0.950049353757991</dd></dl>\n"
],
"text/latex": [
"\\begin{description*}\n",
"\\item[(Intercept)] 34.5538408793831\n",
"\\item[lstat] -0.950049353757991\n",
"\\end{description*}\n"
],
"text/markdown": [
"(Intercept)\n",
": 34.5538408793831lstat\n",
": -0.950049353757991\n",
"\n"
],
"text/plain": [
"(Intercept) lstat \n",
" 34.5538409 -0.9500494 "
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# create linear model and fit with response~predictors\n",
"lm.fit = lm(medv~lstat, data=Boston)\n",
"summary(lm.fit)\n",
"\n",
"names(lm.fit)\n",
"coef(lm.fit)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<table>\n",
"<caption>A matrix: 2 × 2 of type dbl</caption>\n",
"<thead>\n",
"\t<tr><th></th><th scope=col>2.5 %</th><th scope=col>97.5 %</th></tr>\n",
"</thead>\n",
"<tbody>\n",
"\t<tr><th scope=row>(Intercept)</th><td>33.448457</td><td>35.6592247</td></tr>\n",
"\t<tr><th scope=row>lstat</th><td>-1.026148</td><td>-0.8739505</td></tr>\n",
"</tbody>\n",
"</table>\n"
],
"text/latex": [
"A matrix: 2 × 2 of type dbl\n",
"\\begin{tabular}{r|ll}\n",
" & 2.5 \\% & 97.5 \\%\\\\\n",
"\\hline\n",
"\t(Intercept) & 33.448457 & 35.6592247\\\\\n",
"\tlstat & -1.026148 & -0.8739505\\\\\n",
"\\end{tabular}\n"
],
"text/markdown": [
2020-03-28 01:06:31 +00:00
"\n",
2020-08-01 22:25:45 +00:00
"A matrix: 2 × 2 of type dbl\n",
2020-03-28 01:06:31 +00:00
"\n",
2020-08-01 22:25:45 +00:00
"| <!--/--> | 2.5 % | 97.5 % |\n",
"|---|---|---|\n",
"| (Intercept) | 33.448457 | 35.6592247 |\n",
"| lstat | -1.026148 | -0.8739505 |\n",
"\n"
],
"text/plain": [
" 2.5 % 97.5 % \n",
"(Intercept) 33.448457 35.6592247\n",
"lstat -1.026148 -0.8739505"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# confidence interval\n",
"confint(lm.fit)\n"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<table>\n",
"<caption>A matrix: 3 × 3 of type dbl</caption>\n",
"<thead>\n",
"\t<tr><th></th><th scope=col>fit</th><th scope=col>lwr</th><th scope=col>upr</th></tr>\n",
"</thead>\n",
"<tbody>\n",
"\t<tr><th scope=row>1</th><td>29.80359</td><td>29.00741</td><td>30.59978</td></tr>\n",
"\t<tr><th scope=row>2</th><td>25.05335</td><td>24.47413</td><td>25.63256</td></tr>\n",
"\t<tr><th scope=row>3</th><td>20.30310</td><td>19.73159</td><td>20.87461</td></tr>\n",
"</tbody>\n",
"</table>\n"
],
"text/latex": [
"A matrix: 3 × 3 of type dbl\n",
"\\begin{tabular}{r|lll}\n",
" & fit & lwr & upr\\\\\n",
"\\hline\n",
"\t1 & 29.80359 & 29.00741 & 30.59978\\\\\n",
"\t2 & 25.05335 & 24.47413 & 25.63256\\\\\n",
"\t3 & 20.30310 & 19.73159 & 20.87461\\\\\n",
"\\end{tabular}\n"
],
"text/markdown": [
2020-03-28 01:06:31 +00:00
"\n",
2020-08-01 22:25:45 +00:00
"A matrix: 3 × 3 of type dbl\n",
2020-03-28 01:06:31 +00:00
"\n",
2020-08-01 22:25:45 +00:00
"| <!--/--> | fit | lwr | upr |\n",
"|---|---|---|---|\n",
"| 1 | 29.80359 | 29.00741 | 30.59978 |\n",
"| 2 | 25.05335 | 24.47413 | 25.63256 |\n",
"| 3 | 20.30310 | 19.73159 | 20.87461 |\n",
"\n"
],
"text/plain": [
" fit lwr upr \n",
"1 29.80359 29.00741 30.59978\n",
"2 25.05335 24.47413 25.63256\n",
"3 20.30310 19.73159 20.87461"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# confidence interval for lstat[5,10,15]\n",
"predict(lm.fit, data.frame(lstat=c(5, 10, 15)), interval=\"confidence\")\n"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<table>\n",
"<caption>A matrix: 3 × 3 of type dbl</caption>\n",
"<thead>\n",
"\t<tr><th></th><th scope=col>fit</th><th scope=col>lwr</th><th scope=col>upr</th></tr>\n",
"</thead>\n",
"<tbody>\n",
"\t<tr><th scope=row>1</th><td>29.80359</td><td>17.565675</td><td>42.04151</td></tr>\n",
"\t<tr><th scope=row>2</th><td>25.05335</td><td>12.827626</td><td>37.27907</td></tr>\n",
"\t<tr><th scope=row>3</th><td>20.30310</td><td> 8.077742</td><td>32.52846</td></tr>\n",
"</tbody>\n",
"</table>\n"
],
"text/latex": [
"A matrix: 3 × 3 of type dbl\n",
"\\begin{tabular}{r|lll}\n",
" & fit & lwr & upr\\\\\n",
"\\hline\n",
"\t1 & 29.80359 & 17.565675 & 42.04151\\\\\n",
"\t2 & 25.05335 & 12.827626 & 37.27907\\\\\n",
"\t3 & 20.30310 & 8.077742 & 32.52846\\\\\n",
"\\end{tabular}\n"
],
"text/markdown": [
2020-03-28 01:06:31 +00:00
"\n",
2020-08-01 22:25:45 +00:00
"A matrix: 3 × 3 of type dbl\n",
2020-03-28 01:06:31 +00:00
"\n",
2020-08-01 22:25:45 +00:00
"| <!--/--> | fit | lwr | upr |\n",
"|---|---|---|---|\n",
"| 1 | 29.80359 | 17.565675 | 42.04151 |\n",
"| 2 | 25.05335 | 12.827626 | 37.27907 |\n",
"| 3 | 20.30310 | 8.077742 | 32.52846 |\n",
"\n"
],
"text/plain": [
" fit lwr upr \n",
"1 29.80359 17.565675 42.04151\n",
"2 25.05335 12.827626 37.27907\n",
"3 20.30310 8.077742 32.52846"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# prediction interval for lstat[5,10,15]\n",
"predict(lm.fit, data.frame(lstat=c(5, 10, 15)), interval=\"predict\")"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA0gAAANICAIAAAByhViMAAAACXBIW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dPdHS0SqW6fPmyh4eHpaWlhYVFrVq1jh07luOc8fHxo0ePdnNz\nc3Fxadq0ad26datWrdqzZ0/t0HPnzp0BAwZUq1atbt26EydOTExMLOAPwXA3b97s27evs7Nz\nvXr1pkyZUpCff3p6+rx58zw8PCpXrtyjR4+LFy/qjwkNDX3zzTcrV67s7u7+zTffFMYfEgBA\nHopzsFOoCnaFsWjMnDlzxowZJ06c8PHxEULUq1fP2to6LCxM+wnZdevWBQQEnDx5skOHDsY9\nemBg4KhRo5KSkjRv3wAAACVWRkaGlZVVcHCwzpvIigPTuMdOm1KpvHv3bseOHXXee6J+ouLK\nlSsS9QUAACAx0wt25ubmTk5O+q/qUD/Z6uDgIEVTAAAA0jOlYBcSEnLz5s3MzMzBgwcfOnTo\n8ePH2p+uXbtWCNG8eXOJugMAAJCYKQW7qVOnNmjQwNbWdsuWLbGxsSNHjlTXHzx48Mknn8ya\nNatr166vevIUAABA9kzjBcWff/55jx49bt++fefOnTt37ty+fTs5OTk2Nlb96cmTJ5ctW1av\nXr2goCDD3/cGAAAgM6YR7Ozs7Fq2bKmzXqrmNruGDRtu3br17bffLsjKEAAAAKbONIJdjjRr\n2Ht4eBTNcggAAADFmSndY4fiLDQ0tFu3bg4ODjVq1Bg7duzz58+l7ggAgBLHhM/YofhQv1lQ\nfXE8M
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 420,
"width": 420
},
"text/plain": {
"height": 420,
"width": 420
}
},
"output_type": "display_data"
}
],
"source": [
"# plot y and X\n",
"plot(medv ~ lstat, data = Boston, pch=20)\n",
"# plot regression line\n",
"abline(lm.fit, lwd =3 , col =\"blue\")"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA0gAAANICAIAAAByhViMAAAACXBIWXMAABJ0AAASdAHeZh94\nAAAgAElEQVR4nOzdeSBU6/848Gc2O1mzJnuWsqUilaXcVi2KQovSIlK3otIu1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q6tLQ0JCSEVcJkMvGBaN13/v7A\ncPPmzSOTyXjfJV7z7du3NTU1x4wZ04vaWP4zsSOTf3ji0Td/ET9/eQEAvUAikYKCgohEoouL\nS2dnZ5ett2/fRgjt2LGD9ZfLx8fn6enZ2dkZExPD2m3ChAlGRkZdvjt16lTWrHkLCwuEkImJ\niYqKCl4ybNgwYWFh1gjgH2oeu8N363kFA1FRUYQQ64j9VAngLJgVO+ixL3eCEKJSqREREWFh\nYWJiYnj/Aj5t8+LFi7du3WLthv/14veUy5YtO3XqlL+//61btyZPnjxx4sSZM2fKyMh0P9aH\nDx+UlZWlpKTYC8eNG/f9A2kpFIq8vHxZWVlMTEx+fv7Hjx+Tk5Pz8/PxlqKL7w8MJyEhMXny\n5Li4OCqVKiEhkZiYWFFR4e7u3rvaWC5fvvy1WbE/5Ju/iJ+/vACA3hk9erSbm9vJkyePHTu2\nZcsW9k2FhYUIIdZQORzeHcm+XKiGhkb3atkzJHzxKWlpafYd2G/zfqh57A4fvFtQUNBDe4W3\nQvgAj8DAwAcPHrA2+fv7Kyoq/mglYACCJ3aD3pw5c5zZbNmyJSkpadiwYefOncOThqqqKoRQ\neXl5ARt8oUs8I5SRkcnJyTl8+PDw4cPDw8NXrlwpLy+/fPny9vb2Lsdqbm4eMmRIl8Iu7VTP\nmEzmv
"text/plain": [
"Plot with title “”"
]
},
"metadata": {
"image/png": {
"height": 420,
"width": 420
},
"text/plain": {
"height": 420,
"width": 420
}
},
"output_type": "display_data"
}
],
"source": [
"par(mfrow=c(2,2))\n",
"plot(lm.fit)\n"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<table>\n",
"<caption>A data.frame: 6 × 1</caption>\n",
"<thead>\n",
"\t<tr><th></th><th scope=col>lstat</th></tr>\n",
"\t<tr><th></th><th scope=col>&lt;dbl&gt;</th></tr>\n",
"</thead>\n",
"<tbody>\n",
"\t<tr><th scope=row>1</th><td>4.98</td></tr>\n",
"\t<tr><th scope=row>2</th><td>9.14</td></tr>\n",
"\t<tr><th scope=row>3</th><td>4.03</td></tr>\n",
"\t<tr><th scope=row>4</th><td>2.94</td></tr>\n",
"\t<tr><th scope=row>5</th><td>5.33</td></tr>\n",
"\t<tr><th scope=row>6</th><td>5.21</td></tr>\n",
"</tbody>\n",
"</table>\n"
],
"text/latex": [
"A data.frame: 6 × 1\n",
"\\begin{tabular}{r|l}\n",
" & lstat\\\\\n",
" & <dbl>\\\\\n",
"\\hline\n",
"\t1 & 4.98\\\\\n",
"\t2 & 9.14\\\\\n",
"\t3 & 4.03\\\\\n",
"\t4 & 2.94\\\\\n",
"\t5 & 5.33\\\\\n",
"\t6 & 5.21\\\\\n",
"\\end{tabular}\n"
],
"text/markdown": [
2020-03-28 01:06:31 +00:00
"\n",
2020-08-01 22:25:45 +00:00
"A data.frame: 6 × 1\n",
2020-03-28 01:06:31 +00:00
"\n",
2020-08-01 22:25:45 +00:00
"| <!--/--> | lstat &lt;dbl&gt; |\n",
"|---|---|\n",
"| 1 | 4.98 |\n",
"| 2 | 9.14 |\n",
"| 3 | 4.03 |\n",
"| 4 | 2.94 |\n",
"| 5 | 5.33 |\n",
"| 6 | 5.21 |\n",
"\n"
],
"text/plain": [
" lstat\n",
"1 4.98 \n",
"2 9.14 \n",
"3 4.03 \n",
"4 2.94 \n",
"5 5.33 \n",
"6 5.21 "
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"head(Boston[\"lstat\"])"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<ol>\n",
"\t<li><style>\n",
".dl-inline {width: auto; margin:0; padding: 0}\n",
".dl-inline>dt, .dl-inline>dd {float: none; width: auto; display: inline-block}\n",
".dl-inline>dt::after {content: \":\\0020\"; padding-right: .5ex}\n",
".dl-inline>dt:not(:first-of-type) {padding-left: .5ex}\n",
"</style><dl class=dl-inline><dt>1</dt><dd>-5.82259509766825</dd><dt>2</dt><dd>-4.27038978603509</dd><dt>3</dt><dd>3.9748580162616</dd><dt>4</dt><dd>1.63930422066539</dd><dt>5</dt><dd>6.70992217614699</dd><dt>6</dt><dd>-0.904083746303969</dd><dt>7</dt><dd>0.155272587828725</dd><dt>8</dt><dd>10.7396042450824</dd><dt>9</dt><dd>10.3811362785936</dd><dt>10</dt><dd>0.592003069878544</dd><dt>11</dt><dd>-0.125331595032186</dd><dt>12</dt><dd>-3.04668595501456</dd><dt>13</dt><dd>2.07143446815494</dd><dt>14</dt><dd>-6.3064332173421</dd><dt>15</dt><dd>-6.60633450982611</dd><dt>16</dt><dd>-6.60692285305292</dd><dt>17</dt><dd>-5.20251613165552</dd><dt>18</dt><dd>-3.11661685975337</dd><dt>19</dt><dd>-3.24776393395219</dd><dt>20</dt><dd>-5.63728416899296</dd><dt>21</dt><dd>-0.983803463390131</dd><dt>22</dt><dd>-1.81465831691008</dd><dt>23</dt><dd>-1.56891697703351</dd><dt>24</dt><dd>-1.16685972667424</dd><dt>25</dt><dd>-3.46803641312785</dd><dt>26</dt><dd>-4.96852604883867</dd><dt>27</dt><dd>-3.88360995022725</dd><dt>28</dt><dd>-3.33698804644502</dd><dt>29</dt><dd>-3.99320915128082</dd><dt>30</dt><dd>-2.17224962136237</dd><dt>31</dt><dd>-0.382725484452505</dd><dt>32</dt><dd>-7.6651973063789</dd><dt>33</dt><dd>4.97202671325083</dd><dt>34</dt><dd>-4.02043523792397</dd><dt>35</dt><dd>-1.72983702394557</dd><dt>36</dt><dd>-6.45736313500575</dd><dt>37</dt><dd>-3.71377775300442</dd><dt>38</dt><dd>-5.22190804692552</dd><dt>39</dt><dd>-0.229840925814653</dd><dt>40</dt><dd>0.350372328851421</dd><dt>41</dt><dd>2.22725684105772</dd><dt>42</dt><dd>-3.35560200719442</dd><dt>43</dt><dd>-3.73405413404917</dd><dt>44</dt><dd>-2.78547368742365</dd><dt>45</dt><dd>-4.28086955099429</dd><dt>46</dt><dd>-5.55383697751401</dd><dt>47</dt><dd>-1.11064252370753</dd><dt>48</dt><dd>-0.0929130287328693</dd><dt>49</dt><dd>9.1171797099006</dd><dt>50</dt><dd>0.23695865149635</dd><dt>51</dt><dd>-2.07567707133812</dd><dt>52</dt><dd>-5.09487547344525</dd><dt>53</dt><dd>-4.53758029154091</dd><dt>54</dt><dd>-3.14492482720324</dd><dt>55</dt><dd>-1.59311044376484</dd><dt>56</dt><dd>5.41589651219283</dd><dt>57</dt><dd>-4.37205610819949</dd><dt>58</dt><dd>0.798854067960966</dd><dt>59</dt><dd>-4.73650231260328</dd><dt>60</dt><dd>-6.19438583773442</dd><dt>61</dt><dd>-3.36069187746552</dd><dt>62</dt><dd>-4.83512821111771</dd><dt>63</dt><dd>-5.96000872859182</dd><dt>64</dt><dd>-0.528372018682188</dd><dt>65</dt><dd>6.09405641836873</dd><dt>66</dt><dd>-6.61711039733328</dd><dt>67</dt><dd>-5.42533549690128</dd><dt>68</dt><dd>-4.85844111394338</dd><dt>69</dt><dd>-4.717694838691</dd><dt>70</dt><dd>-5.30290705985036</dd><dt>71</dt><dd>-3.9695092221294</dd><dt>72</dt><dd>-3.46735326425415</dd><dt>73</dt><dd>-6.50956844663899</dd><dt>74</dt><dd>-3.99046875204785</dd><dt>75</dt><dd>-4.01250626090392</dd><dt>76</dt><dd>-4.66039965678666</dd><dt>77</dt><dd>-3.18175011489995</dd><dt>78</dt><dd>-3.99683401628853</dd><dt>79</dt><dd>-1.63023185400949</dd><dt>80</dt><dd>-5.60839176018538</dd><dt>81</dt><dd>-1.52807979800333</dd><dt>82</dt><dd>-3.79448454525041</dd><dt>83</dt><dd>-3.3695092221294</dd><dt>84</dt><dd>-4.51897023266059</dd><dt>85</dt><dd>-1.51436609623123</dd><dt>86</dt><dd>-1.75001859934342</dd><dt>87</dt><dd>0.163793809944662</dd><dt>88</dt><dd>-4.33542433366566</dd><dt>89</dt><dd>-5.72856943371415</dd><dt>90</dt><dd>-0.438559562962554</dd><dt>91</dt><dd>-3.5839060727752</dd><dt>92</dt><dd>-4.76343617856758</dd><dt>93</dt><dd>-3.9014381527179</dd><dt>94</dt><dd>-3.65403439254598</dd><dt>95</dt><dd>-3.89281822308598</dd><dt>96</dt><dd>0.163987323107537</dd><dt>97</dt><dd>-2.38028120776749</dd><dt>98</dt><dd>8.14586689993804</dd><dt>99</dt><dd>12.6378353135329</dd><dt>100</dt><dd>4.52696462037887</dd><dt>101</dt><dd>1.89562403301717</dd><dt>102</dt><dd>-0.766962336059311</dd><dt>103</dt><dd>-5.85481624893566</dd><dt>104</dt><dd>-2.4851775648757</dd><dt>105</dt><dd>-2.73973234754707</dd><dt>106</dt><dd>0.593471977011008</dd><dt>107</dt><dd>2.67408006174101</dd><dt>108</dt><dd>-0.76764548493301</dd><dt>109</dt><dd>-3.09673530877255</dd><dt>110</dt><dd>-0.380573428446343</dd><dt>
"</li>\n",
"</ol>\n"
],
"text/latex": [
"\\begin{enumerate}\n",
"\\item \\begin{description*}\n",
"\\item[1] -5.82259509766825\n",
"\\item[2] -4.27038978603509\n",
"\\item[3] 3.9748580162616\n",
"\\item[4] 1.63930422066539\n",
"\\item[5] 6.70992217614699\n",
"\\item[6] -0.904083746303969\n",
"\\item[7] 0.155272587828725\n",
"\\item[8] 10.7396042450824\n",
"\\item[9] 10.3811362785936\n",
"\\item[10] 0.592003069878544\n",
"\\item[11] -0.125331595032186\n",
"\\item[12] -3.04668595501456\n",
"\\item[13] 2.07143446815494\n",
"\\item[14] -6.3064332173421\n",
"\\item[15] -6.60633450982611\n",
"\\item[16] -6.60692285305292\n",
"\\item[17] -5.20251613165552\n",
"\\item[18] -3.11661685975337\n",
"\\item[19] -3.24776393395219\n",
"\\item[20] -5.63728416899296\n",
"\\item[21] -0.983803463390131\n",
"\\item[22] -1.81465831691008\n",
"\\item[23] -1.56891697703351\n",
"\\item[24] -1.16685972667424\n",
"\\item[25] -3.46803641312785\n",
"\\item[26] -4.96852604883867\n",
"\\item[27] -3.88360995022725\n",
"\\item[28] -3.33698804644502\n",
"\\item[29] -3.99320915128082\n",
"\\item[30] -2.17224962136237\n",
"\\item[31] -0.382725484452505\n",
"\\item[32] -7.6651973063789\n",
"\\item[33] 4.97202671325083\n",
"\\item[34] -4.02043523792397\n",
"\\item[35] -1.72983702394557\n",
"\\item[36] -6.45736313500575\n",
"\\item[37] -3.71377775300442\n",
"\\item[38] -5.22190804692552\n",
"\\item[39] -0.229840925814653\n",
"\\item[40] 0.350372328851421\n",
"\\item[41] 2.22725684105772\n",
"\\item[42] -3.35560200719442\n",
"\\item[43] -3.73405413404917\n",
"\\item[44] -2.78547368742365\n",
"\\item[45] -4.28086955099429\n",
"\\item[46] -5.55383697751401\n",
"\\item[47] -1.11064252370753\n",
"\\item[48] -0.0929130287328693\n",
"\\item[49] 9.1171797099006\n",
"\\item[50] 0.23695865149635\n",
"\\item[51] -2.07567707133812\n",
"\\item[52] -5.09487547344525\n",
"\\item[53] -4.53758029154091\n",
"\\item[54] -3.14492482720324\n",
"\\item[55] -1.59311044376484\n",
"\\item[56] 5.41589651219283\n",
"\\item[57] -4.37205610819949\n",
"\\item[58] 0.798854067960966\n",
"\\item[59] -4.73650231260328\n",
"\\item[60] -6.19438583773442\n",
"\\item[61] -3.36069187746552\n",
"\\item[62] -4.83512821111771\n",
"\\item[63] -5.96000872859182\n",
"\\item[64] -0.528372018682188\n",
"\\item[65] 6.09405641836873\n",
"\\item[66] -6.61711039733328\n",
"\\item[67] -5.42533549690128\n",
"\\item[68] -4.85844111394338\n",
"\\item[69] -4.717694838691\n",
"\\item[70] -5.30290705985036\n",
"\\item[71] -3.9695092221294\n",
"\\item[72] -3.46735326425415\n",
"\\item[73] -6.50956844663899\n",
"\\item[74] -3.99046875204785\n",
"\\item[75] -4.01250626090392\n",
"\\item[76] -4.66039965678666\n",
"\\item[77] -3.18175011489995\n",
"\\item[78] -3.99683401628853\n",
"\\item[79] -1.63023185400949\n",
"\\item[80] -5.60839176018538\n",
"\\item[81] -1.52807979800333\n",
"\\item[82] -3.79448454525041\n",
"\\item[83] -3.3695092221294\n",
"\\item[84] -4.51897023266059\n",
"\\item[85] -1.51436609623123\n",
"\\item[86] -1.75001859934342\n",
"\\item[87] 0.163793809944662\n",
"\\item[88] -4.33542433366566\n",
"\\item[89] -5.72856943371415\n",
"\\item[90] -0.438559562962554\n",
"\\item[91] -3.5839060727752\n",
"\\item[92] -4.76343617856758\n",
"\\item[93] -3.9014381527179\n",
"\\item[94] -3.65403439254598\n",
"\\item[95] -3.89281822308598\n",
"\\item[96] 0.163987323107537\n",
"\\item[97] -2.38028120776749\n",
"\\item[98] 8.14586689993804\n",
"\\item[99] 12.6378353135329\n",
"\\item[100] 4.52696462037887\n",
"\\item[101] 1.89562403301717\n",
"\\item[102] -0.766962336059311\n",
"\\item[103] -5.85481624893566\n",
"\\item[104] -2.4851775648757\n",
"\\item[105] -2.73973234754707\n",
"\\item[106] 0.593471977011008\n",
"\\item[107] 2.67408006174101\n",
"\\item[108] -0.76764548493301\n",
"\\item[109] -3.09673530877255\n",
"\\item[110] -0.380573428446343\n",
"\\item[111] -0.50319928052922\n",
"\\item[112] -2.10133944520191\n",
"\\item[113] -0.353540854966066\n",
"\\item[114] 0.382502576340963\n",
"\\item[115] -6.1258251326121\n",
"\\item[116] -1.28106306415716\n",
"\\item[117] -1.91524666013689\n",
"\\item[118] -5.56833253567579\n",
"\\item[119] 0.448417687877217\n",
"\\item[120] -2.32366917473684\n",
"\\item[121] 1.09836833411923\n",
"\\item[122] -0.69663660125657\n",
"\\item[123] 2.98054403349768\n",
"\\item[124] 6.88691319960745\n",
"\\item[125] 0.948026759682379\n",
"\\item[126] 0.916390049772744\n",
"\\item[127] 7.04450450405973\n",
"\\item[128] -2.02249248828324\n",
"\\item[129] -1.93258132504762\n",
"\\item[130] -2.82993573146155\n",
"\\item[131] -3.38321902203242\n",
"\\item[132] -3.30623580231013\n",
"\\item[133] -0.989292065594243\n",
"\\item[134] -1.8745990924005\n",
"\\item[135] -2.50848656583228\n",
"\\item[136] -0.341003839647572\n",
"\\item[137] -1.09800680087306\n",
"\\item[138] -3.59262080805401\n",
"\\item[139] -0.998788657262733\n",
"\\item[140] 0.784070190989414\n",
"\\item[141] 2.39935150740996\n",
"\\item[142] 12.5373573834294\n",
"\\item[143] 4.32648278840622\n",
"\\item[144] 6.14646304690302\n",
"\\item[145] 5.07310469218845\n",
"\\item[146] 5.65753115508905\n",
"\\item[147] -3.13551913931255\n",
"\\item[148] 8.10111653709037\n",
"\\item[149] 10.1515568190432\n",
"\\item[150] 1.22471775872581\n",
"\\item[151] 0.341855008604571\n",
"\\item[152] -2.33718546147698\n",
"\\item[153] -7.73924271183625\n",
"\\item[154] -0.152561583544426\n",
"\\item[155] -3.18909465056228\n",
"\\item[156] -4.68409958593808\n",
"\\item[157] -6.12004430972913\n",
"\\item[158] 11.1068856543661\n",
"\\item[159] -4.14502353471922\n",
"\\item[160] -4.23297615511155\n",
"\\item[161] -2.32856943371415\n",
"\\item[162] 17.0897445026182\n",
"\\item[163] 17.2702538798322\n",
"\\item[164] 18.6003229750934\n",
"\\item[165] -0.795266401640087\n",
"\\item[166] -0.23385671901721\n",
"\\item[167] 18.9613417295215\n",
"\\item[168] 0.77975827523891\n",
"\\item[169] -0.208293052669401\n",
"\\item[170] -1.49928219484264\n",
"\\item[171] -3.44462870465529\n",
"\\item[172] -4.02474715367447\n",
"\\item[173] 2.50238412732179\n",
"\\item[174] -2.36539472141086\n",
"\\item[175] -2.79536510915607\n",
"\\item[176] -0.0900778238530112\n",
"\\item[177] -1.74884191288981\n",
"\\item[178] -3.97803044424534\n",
"\\item[179] 1.92050064862219\n",
"\\item[180] 7.43440786355718\n",
"\\item[181] 12.4285322350273\n",
"\\item[182] 10.6241255136299\n",
"\\item[183] 7.92539700573041\n",
"\\item[184] 3.34243944996229\n",
"\\item[185] 5.12784908615361\n",
"\\item[186] 7.53930812253448\n",
"\\item[187] 19.67387874484\n",
"\\item[188] 3.79248880372028\n",
"\\item[189] -0.421615826246662\n",
"\\item[190] 5.46692513737247\n",
"\\item[191] 7.29141082478265\n",
"\\item[192] 0.401890589741876\n",
"\\item[193] 4.57280076590233\n",
"\\item[194] 1.32490737001959\n",
"\\item[195] -1.2926247099231\n",
"\\item[196] 18.2678057012781\n",
"\\item[197] 2.6223604839495\n",
"\\item[198] 3.9260840564732\n",
"\\item[199] 6.3354858424948\n",
"\\item[200] 4.67838417375334\n",
"\\item[201] ⋯\n",
"\\item[202] 4.9929784394311\n",
"\\item[203] 0.80003075441457\n",
"\\item[204] -7.44061681332182\n",
"\\item[205] -4.78184882241593\n",
"\\item[206] -6.44521704788209\n",
"\\item[207] -6.77254574391031\n",
"\\item[208] -4.01926245333945\n",
"\\item[209] -5.44845098469497\n",
"\\item[210] -1.93738287650894\n",
"\\item[211] -7.42827331116621\n",
"\\item[212] 0.660563775000872\n",
"\\item[213] 0.389945819519275\n",
"\\item[214] -1.61132957445031\n",
"\\item[215] -1.45971260604388\n",
"\\item[216] -3.91348553232557\n",
"\\item[217] -4.9270018190657\n",
"\\item[218] -6.83846085544657\n",
"\\item[219] -4.90026146626429\n",
"\\item[220] -3.7395388343842\n",
"\\item[221] -5.12759016229251\n",
"\\item[222] -5.71103735377146\n",
"\\item[223] -0.202709644818399\n",
"\\item[224] -5.78184882241593\n",
"\\item[225] -4.98047862279945\n",
"\\item[226] -6.11789225372296\n",
"\\item[227] -5.64472741217127\n",
"\\item[228] -7.71495443945803\n",
"\\item[229] -6.95756055003771\n",
"\\item[230] -7.44100774151666\n",
"\\item[231] -5.84394555578159\n",
"\\item[232] -5.74335721255479\n",
"\\item[233] -6.02131970369872\n",
"\\item[234] -5.8689208789026\n",
"\\item[235] -6.30036017378027\n",
"\\item[236] -7.02788238297137\n",
"\\item[237] 3.36193007274827\n",
"\\item[238] -9.83591396937648\n",
"\\item[239] -3.83248651940073\n",
"\\item[240] 1.02588664144124\n",
"\\item[241] -7.04982118431146\n",
"\\item[242] -5.31671556726936\n",
"\\item[243] -5.41152698948228\n",
"\\item[244] -4.36304525037273\n",
"\\item[245] -2.35805018574853\n",
"\\item[246] -5.97254574391032\n",
"\\item[247] -5.23806992725173\n",
"\\item[248] -8.55295641360835\n",
"\\item[249] -0.17861878747214\n",
"\\item[250] -8.70594358163128\n",
"\\item[251] -8.66206597895109\n",
"\\item[252] -0.0329722532424588\n",
"\\item[253] -0.246685955014562\n",
"\\item[254] -0.947274298241365\n",
"\\item[255] 0.0832844327306455\n",
"\\item[256] -2.15295641360835\n",
"\\item[257] -1.17264054955721\n",
"\\item[258] -4.07283796458917\n",
"\\item[259] -3.84511834036611\n",
"\\item[260] -7.62807979800333\n",
"\\item[261] -0.289489480626205\n",
"\\item[262] 0.646850073228771\n",
"\\item[263] 1.21031700621092\n",
"\\item[264] 18.5433200138679\n",
"\\item[265] 18.9898432101342\n",
"\\item[266] 18.2583052077406\n",
"\\item[267] 24.5001294619306\n",
"\\item[268] 23.8825973819879\n",
"\\item[269] 12.2793751507822\n",
"\\item[270] 15.3195330828078\n",
"\\item[271] -6.7851775648757\n",
"\\item[272] 1.42530610195261\n",
"\\item[273] -1.07479260556337\n",
"\\item[274] 1.05282831114371\n",
"\\item[275] -3.66176595453406\n",
"\\item[276] -7.80349150120808\n",
"\\item[277] -3.62680050216465\n",
"\\item[278] -0.832676130694512\n",
"\\item[279] 1.07937124891316\n",
"\\item[280] 3.34617082622416\n",
"\\item[281] 1.9171797099006\n",
"\\item[282] 2.81355484489288\n",
"\\item[283] 3.23823794733503\n",
"\\item[284] 4.73667033268659\n",
"\\item[285] -3.24531185352899\n",
"\\item[286] -3.19849643658388\n",
"\\item[287] 6.46908499711681\n",
"\\item[288] -0.456573474877896\n",
"\\item[289] -6.34159218287438\n",
"\\item[290] -6.32053394543995\n",
"\\item[291] -5.1889959430463\n",
"\\item[292] -3.65138489709082\n",
"\\item[293] -7.12885775252392\n",
"\\item[294] -0.491831147926157\n",
"\\item[295] 0.219138252743884\n",
"\\item[296] -3.52101967928168\n",
"\\item[297] -8.04883801102073\n",
"\\item[298] -3.15833850455831\n",
"\\item[299] -7.47136515558762\n",
"\\item[300] -0.04148957348931\n",
"\\item[301] -7.72170673002447\n",
"\\item[302] -0.479688962671592\n",
"\\item[303] 4.87025778170133\n",
"\\item[304] 7.72746205982786\n",
"\\item[305] 11.73813533795\n",
"\\item[306] -9.94884191288981\n",
"\\item[307] 2.80620640736146\n",
"\\item[308] 15.999355409279\n",
"\\item[309] 0.823150144077356\n",
"\\item[310] 7.5789842225874\n",
"\\item[311] 0.245092847286538\n",
"\\item[312] -2.55206804596451\n",
"\\item[313] 1.15547390472978\n",
"\\item[314] -6.16382320489333\n",
"\\item[315] -4.54971857492639\n",
"\\item[316] -3.58409958593808\n",
"\\item[317] -5.43806602538264\n",
"\\item[318] -0.358144991395428\n",
"\\item[319] 0.972808569640508\n",
"\\item[320] -6.55099396889598\n",
"\\item[321] -3.0821371412257\n",
"\\item[322] -9.44756651892023\n",
"\\item[323] -9.85912426281707\n",
"\\item[324] -3.10877878651114\n",
"\\item[325] -2.17665244089068\n",
"\\item[326] -3.29497027909214\n",
"\\item[327] -1.74736910388826\n",
"\\item[328] -7.02474715367447\n",
"\\item[329] -4.84404036142849\n",
"\\item[330] -8.44159218287438\n",
"\\item[331] 0.953807582565348\n",
"\\item[332] -7.80545004405136\n",
"\\item[333] -0.725035472484242\n",
"\\item[334] 6.16683813546375\n",
"\\item[335] -0.0167116654002677\n",
"\\item[336] -3.04824966779392\n",
"\\item[337] 1.09112250597288\n",
"\\item[338] -0.392522100538033\n",
"\\item[339] -1.24541056104497\n",
"\\item[340] -1.1521667534805\n",
"\\item[341] 0.0283426237335237\n",
"\\item[342] -2.75246287602844\n",
"\\item[343] -6.33502950360173\n",
"\\item[344] -3.22944609575073\n",
"\\item[345] -3.2083878583163\n",
"\\item[346] -4.58498014984374\n",
"\\item[347] -2.50946583725392\n",
"\\item[348] -2.0464885399826\n",
"\\item[349] -0.850014697474333\n",
"\\item[350] -1.87841747057109\n",
"\\item[351] -3.22944609575073\n",
"\\item[352] -3.79340266444369\n",
"\\item[353] -4.96000482672273\n",
"\\item[354] -4.23453986789091\n",
"\\item[355] -0.588115379140635\n",
"\\item[356] -2.55403049067689\n",
"\\item[357] -2.93561784682853\n",
"\\item[358] -1.76265042030881\n",
"\\item[359] -4.57783302921338\n",
"\\item[360] -0.594188422702462\n",
"\\item[361] -1.22964351078269\n",
"\\item[362] 0.739505537566442\n",
"\\item[363] 4.80121134273727\n",
"\\item[364] 1.77055390424928\n",
"\\item[365] -0.431112417915154\n",
"\\item[366] 0.822463093334569\n",
"\\item[367] -2.72670569651776\n",
"\\item[368] 2.28886784058165\n",
"\\item[369] 6.32373458543507\n",
"\\item[370] -3.51994560221314\n",
"\\item[371] 1.64234854618448\n",
"\\item[372] -0.106918951183831\n",
"\\item[373] 1.11188852272845\n",
"\\item[374] -2.82445103112652\n",
"\\item[375] -0.698693851615842\n",
"\\item[376] -1.35031082002228\n",
"\\item[377] -3.50045888129625\n",
"\\item[378] -2.89399490953959\n",
"\\item[379] -2.85432661322483\n",
"\\item[380] -1.2801825002515\n",
"\\item[381] -3.30231871662356\n",
"\\item[382] -1.22210156008839\n",
"\\item[383] -3.0757757788541\n",
"\\item[384] -2.19594955051379\n",
"\\item[385] -4.78115786980406\n",
"\\item[386] 1.74362394015407\n",
"\\item[387] -3.7864490569762\n",
"\\item[388] -1.77068200671392\n",
"\\item[389] -1.34374814074963\n",
"\\item[390] 2.857329838188\n",
"\\item[391] 5.26702774675754\n",
"\\item[392] 5.23020245906083\n",
"\\item[393] -2.85814499139543\n",
"\\item[394] -1.07920322882986\n",
"\\item[395] -2.70809563763744\n",
"\\item[396] -4.13963364003109\n",
"\\item[397] -2.96686362854333\n",
"\\item[398] -5.32739274726054\n",
"\\item[399] -5.29556252418803\n",
"\\item[400] -6.39752106703132\n",
"\\item[401] -15.1674519717701\n",
"\\end{description*}\n",
2020-03-28 01:06:31 +00:00
"\n",
2020-08-01 22:25:45 +00:00
"\\end{enumerate}\n"
],
"text/markdown": [
"1. 1\n",
": -5.822595097668252\n",
": -4.270389786035093\n",
": 3.97485801626164\n",
": 1.639304220665395\n",
": 6.709922176146996\n",
": -0.9040837463039697\n",
": 0.1552725878287258\n",
": 10.73960424508249\n",
": 10.381136278593610\n",
": 0.59200306987854411\n",
": -0.12533159503218612\n",
": -3.0466859550145613\n",
": 2.0714344681549414\n",
": -6.306433217342115\n",
": -6.6063345098261116\n",
": -6.6069228530529217\n",
": -5.2025161316555218\n",
": -3.1166168597533719\n",
": -3.2477639339521920\n",
": -5.6372841689929621\n",
": -0.98380346339013122\n",
": -1.8146583169100823\n",
": -1.5689169770335124\n",
": -1.1668597266742425\n",
": -3.4680364131278526\n",
": -4.9685260488386727\n",
": -3.8836099502272528\n",
": -3.3369880464450229\n",
": -3.9932091512808230\n",
": -2.1722496213623731\n",
": -0.38272548445250532\n",
": -7.665197306378933\n",
": 4.9720267132508334\n",
": -4.0204352379239735\n",
": -1.7298370239455736\n",
": -6.4573631350057537\n",
": -3.7137777530044238\n",
": -5.2219080469255239\n",
": -0.22984092581465340\n",
": 0.35037232885142141\n",
": 2.2272568410577242\n",
": -3.3556020071944243\n",
": -3.7340541340491744\n",
": -2.7854736874236545\n",
": -4.2808695509942946\n",
": -5.5538369775140147\n",
": -1.1106425237075348\n",
": -0.092913028732869349\n",
": 9.117179709900650\n",
": 0.2369586514963551\n",
": -2.0756770713381252\n",
": -5.0948754734452553\n",
": -4.5375802915409154\n",
": -3.1449248272032455\n",
": -1.5931104437648456\n",
": 5.4158965121928357\n",
": -4.3720561081994958\n",
": 0.79885406796096659\n",
": -4.7365023126032860\n",
": -6.1943858377344261\n",
": -3.3606918774655262\n",
": -4.8351282111177163\n",
": -5.9600087285918264\n",
": -0.52837201868218865\n",
": 6.0940564183687366\n",
": -6.6171103973332867\n",
": -5.4253354969012868\n",
": -4.8584411139433869\n",
": -4.71769483869170\n",
": -5.3029070598503671\n",
": -3.969509222129472\n",
": -3.4673532642541573\n",
": -6.5095684466389974\n",
": -3.9904687520478575\n",
": -4.0125062609039276\n",
": -4.6603996567866677\n",
": -3.1817501148999578\n",
": -3.9968340162885379\n",
": -1.6302318540094980\n",
": -5.6083917601853881\n",
": -1.5280797980033382\n",
": -3.7944845452504183\n",
": -3.369509222129484\n",
": -4.5189702326605985\n",
": -1.5143660962312386\n",
": -1.7500185993434287\n",
": 0.16379380994466288\n",
": -4.3354243336656689\n",
": -5.7285694337141590\n",
": -0.43855956296255491\n",
": -3.583906072775292\n",
": -4.7634361785675893\n",
": -3.901438152717994\n",
": -3.6540343925459895\n",
": -3.8928182230859896\n",
": 0.16398732310753797\n",
": -2.3802812077674998\n",
": 8.1458668999380499\n",
": 12.6378353135329100\n",
": 4.52696462037887101\n",
": 1.89562403301717102\n",
": -0.766962336059311103\n",
": -5.85481624893566104\n",
": -2.4851775648757105\n",
": -2.73973234754707106\n",
": 0.593471977011008107\n",
": 2.67408006174101108\n",
": -0.76764548493301109\n",
": -3.09673530877255110\n",
": -0.380573428446343111\n",
": -0.50319928052922112\n",
": -2.10133944520191113\n",
": -0.353540854966066114\n",
": 0.382502576340963115\n",
": -6.1258251326121116\n",
": -1.28106306415716117\n",
": -1.91524666013689118\n",
": -5.56833253567579119\n",
": 0.448417687877217120\n",
": -2.32366917473684121\n",
": 1.09836833411923122\n",
": -0.69663660125657123\n",
": 2.98054403349768124\n",
": 6.88691319960745125\n",
": 0.948026759682379126\n",
": 0.916390049772744127\n",
": 7.04450450405973128\n",
": -2.02249248828324129\n",
": -1.93258132504762130\n",
": -2.82993573146155131\n",
": -3.38321902203242132\n",
": -3.30623580231013133\n",
": -0.989292065594243134\n",
": -1.8745990924005135\n",
": -2.50848656583228136\n",
": -0.341003839647572137\n",
": -1.09800680087306138\n",
": -3.59262080805401139\n",
": -0.998788657262733140\n",
": 0.784070190989414141\n",
": 2.39935150740996142\n",
": 12.5373573834294143\n",
": 4.32648278840622144\n",
": 6.14646304690302145\n",
": 5.07310469218845146\n",
": 5.65753115508905147\n",
": -3.13551913931255148\n",
": 8.10111653709037149\n",
": 10.1515568190432150\n",
": 1.22471775872581151\n",
": 0.341855008604571152\n",
": -2.33718546147698153\n",
": -7.73924271183625154\n",
": -0.152561583544426155\n",
": -3.18909465056228156\n",
": -4.68409958593808157\n",
": -6.12004430972913158\n",
": 11.1068856543661159\n",
": -4.14502353471922160\n",
": -4.23297615511155161\n",
": -2.32856943371415162\n",
": 17.0897445026182163\n",
": 17.2702538798322164\n",
": 18.6003229750934165\n",
": -0.795266401640087166\n",
": -0.23385671901721167\n",
": 18.9613417295215168\n",
": 0.77975827523891169\n",
": -0.208293052669401170\n",
": -1.49928219484264171\n",
": -3.44462870465529172\n",
": -4.02474715367447173\n",
": 2.50238412732179174\n",
": -2.36539472141086175\n",
": -2.79536510915607176\n",
": -0.0900778238530112177\n",
": -1.74884191288981178\n",
": -3.97803044424534179\n",
": 1.92050064862219180\n",
": 7.43440786355718181\n",
": 12.4285322350273182\n",
": 10.6241255136299183\n",
": 7.92539700573041184\n",
": 3.34243944996229185\n",
": 5.12784908615361186\n",
": 7.53930812253448187\n",
": 19.67387874484188\n",
": 3.79248880372028189\n",
": -0.421615826246662190\n",
": 5.46692513737247191\n",
": 7.29141082478265192\n",
": 0.401890589741876193\n",
": 4.57280076590233194\n",
": 1.32490737001959195\n",
": -1.2926247099231196\n",
": 18.2678057012781197\n",
": 2.6223604839495198\n",
": 3.9260840564732199\n",
": 6.3354858424948200\n",
": 4.67838417375334201\n",
": ⋯202\n",
": 4.9929784394311203\n",
": 0.80003075441457204\n",
": -7.44061681332182205\n",
": -4.78184882241593206\n",
": -6.44521704788209207\n",
": -6.77254574391031208\n",
": -4.01926245333945209\n",
": -5.44845098469497210\n",
": -1.93738287650894211\n",
": -7.42827331116621212\n",
": 0.660563775000872213\n",
": 0.389945819519275214\n",
": -1.61132957445031215\n",
": -1.45971260604388216\n",
": -3.91348553232557217\n",
": -4.9270018190657218\n",
": -6.83846085544657219\n",
": -4.90026146626429220\n",
": -3.7395388343842221\n",
": -5.12759016229251222\n",
": -5.71103735377146223\n",
": -0.202709644818399224\n",
": -5.78184882241593225\n",
": -4.98047862279945226\n",
": -6.11789225372296227\n",
": -5.64472741217127228\n",
": -7.71495443945803229\n",
": -6.95756055003771230\n",
": -7.44100774151666231\n",
": -5.84394555578159232\n",
": -5.74335721255479233\n",
": -6.02131970369872234\n",
": -5.8689208789026235\n",
": -6.30036017378027236\n",
": -7.02788238297137237\n",
": 3.36193007274827238\n",
": -9.83591396937648239\n",
": -3.83248651940073240\n",
": 1.02588664144124241\n",
": -7.04982118431146242\n",
": -5.31671556726936243\n",
": -5.41152698948228244\n",
": -4.36304525037273245\n",
": -2.35805018574853246\n",
": -5.97254574391032247\n",
": -5.23806992725173248\n",
": -8.55295641360835249\n",
": -0.17861878747214250\n",
": -8.70594358163128251\n",
": -8.66206597895109252\n",
": -0.0329722532424588253\n",
": -0.246685955014562254\n",
": -0.947274298241365255\n",
": 0.0832844327306455256\n",
": -2.15295641360835257\n",
": -1.17264054955721258\n",
": -4.07283796458917259\n",
": -3.84511834036611260\n",
": -7.62807979800333261\n",
": -0.289489480626205262\n",
": 0.646850073228771263\n",
": 1.21031700621092264\n",
": 18.5433200138679265\n",
": 18.9898432101342266\n",
": 18.2583052077406267\n",
": 24.5001294619306268\n",
": 23.8825973819879269\n",
": 12.2793751507822270\n",
": 15.3195330828078271\n",
": -6.7851775648757272\n",
": 1.42530610195261273\n",
": -1.07479260556337274\n",
": 1.05282831114371275\n",
": -3.66176595453406276\n",
": -7.80349150120808277\n",
": -3.62680050216465278\n",
": -0.832676130694512279\n",
": 1.07937124891316280\n",
": 3.34617082622416281\n",
": 1.9171797099006282\n",
": 2.81355484489288283\n",
": 3.23823794733503284\n",
": 4.73667033268659285\n",
": -3.24531185352899286\n",
": -3.19849643658388287\n",
": 6.46908499711681288\n",
": -0.456573474877896289\n",
": -6.34159218287438290\n",
": -6.32053394543995291\n",
": -5.1889959430463292\n",
": -3.65138489709082293\n",
": -7.12885775252392294\n",
": -0.491831147926157295\n",
": 0.219138252743884296\n",
": -3.52101967928168297\n",
": -8.04883801102073298\n",
": -3.15833850455831299\n",
": -7.47136515558762300\n",
": -0.04148957348931301\n",
": -7.72170673002447302\n",
": -0.479688962671592303\n",
": 4.87025778170133304\n",
": 7.72746205982786305\n",
": 11.73813533795306\n",
": -9.94884191288981307\n",
": 2.80620640736146308\n",
": 15.999355409279309\n",
": 0.823150144077356310\n",
": 7.5789842225874311\n",
": 0.245092847286538312\n",
": -2.55206804596451313\n",
": 1.15547390472978314\n",
": -6.16382320489333315\n",
": -4.54971857492639316\n",
": -3.58409958593808317\n",
": -5.43806602538264318\n",
": -0.358144991395428319\n",
": 0.972808569640508320\n",
": -6.55099396889598321\n",
": -3.0821371412257322\n",
": -9.44756651892023323\n",
": -9.85912426281707324\n",
": -3.10877878651114325\n",
": -2.17665244089068326\n",
": -3.29497027909214327\n",
": -1.74736910388826328\n",
": -7.02474715367447329\n",
": -4.84404036142849330\n",
": -8.44159218287438331\n",
": 0.953807582565348332\n",
": -7.80545004405136333\n",
": -0.725035472484242334\n",
": 6.16683813546375335\n",
": -0.0167116654002677336\n",
": -3.04824966779392337\n",
": 1.09112250597288338\n",
": -0.392522100538033339\n",
": -1.24541056104497340\n",
": -1.1521667534805341\n",
": 0.0283426237335237342\n",
": -2.75246287602844343\n",
": -6.33502950360173344\n",
": -3.22944609575073345\n",
": -3.2083878583163346\n",
": -4.58498014984374347\n",
": -2.50946583725392348\n",
": -2.0464885399826349\n",
": -0.850014697474333350\n",
": -1.87841747057109351\n",
": -3.22944609575073352\n",
": -3.79340266444369353\n",
": -4.96000482672273354\n",
": -4.23453986789091355\n",
": -0.588115379140635356\n",
": -2.55403049067689357\n",
": -2.93561784682853358\n",
": -1.76265042030881359\n",
": -4.57783302921338360\n",
": -0.594188422702462361\n",
": -1.22964351078269362\n",
": 0.739505537566442363\n",
": 4.80121134273727364\n",
": 1.77055390424928365\n",
": -0.431112417915154366\n",
": 0.822463093334569367\n",
": -2.72670569651776368\n",
": 2.28886784058165369\n",
": 6.32373458543507370\n",
": -3.51994560221314371\n",
": 1.64234854618448372\n",
": -0.106918951183831373\n",
": 1.11188852272845374\n",
": -2.82445103112652375\n",
": -0.698693851615842376\n",
": -1.35031082002228377\n",
": -3.50045888129625378\n",
": -2.89399490953959379\n",
": -2.85432661322483380\n",
": -1.2801825002515381\n",
": -3.30231871662356382\n",
": -1.22210156008839383\n",
": -3.0757757788541384\n",
": -2.19594955051379385\n",
": -4.78115786980406386\n",
": 1.74362394015407387\n",
": -3.7864490569762388\n",
": -1.77068200671392389\n",
": -1.34374814074963390\n",
": 2.857329838188391\n",
": 5.26702774675754392\n",
": 5.23020245906083393\n",
": -2.85814499139543394\n",
": -1.07920322882986395\n",
": -2.70809563763744396\n",
": -4.13963364003109397\n",
": -2.96686362854333398\n",
": -5.32739274726054399\n",
": -5.29556252418803400\n",
": -6.39752106703132401\n",
": -15.1674519717701\n",
2020-03-28 01:06:31 +00:00
"\n",
"\n",
"\n",
2020-08-01 22:25:45 +00:00
"\n"
],
"text/plain": [
"[[1]]\n",
" 1 2 3 4 5 \n",
" -5.822595098 -4.270389786 3.974858016 1.639304221 6.709922176 \n",
" 6 7 8 9 10 \n",
" -0.904083746 0.155272588 10.739604245 10.381136279 0.592003070 \n",
" 11 12 13 14 15 \n",
" -0.125331595 -3.046685955 2.071434468 -6.306433217 -6.606334510 \n",
" 16 17 18 19 20 \n",
" -6.606922853 -5.202516132 -3.116616860 -3.247763934 -5.637284169 \n",
" 21 22 23 24 25 \n",
" -0.983803463 -1.814658317 -1.568916977 -1.166859727 -3.468036413 \n",
" 26 27 28 29 30 \n",
" -4.968526049 -3.883609950 -3.336988046 -3.993209151 -2.172249621 \n",
" 31 32 33 34 35 \n",
" -0.382725484 -7.665197306 4.972026713 -4.020435238 -1.729837024 \n",
" 36 37 38 39 40 \n",
" -6.457363135 -3.713777753 -5.221908047 -0.229840926 0.350372329 \n",
" 41 42 43 44 45 \n",
" 2.227256841 -3.355602007 -3.734054134 -2.785473687 -4.280869551 \n",
" 46 47 48 49 50 \n",
" -5.553836978 -1.110642524 -0.092913029 9.117179710 0.236958651 \n",
" 51 52 53 54 55 \n",
" -2.075677071 -5.094875473 -4.537580292 -3.144924827 -1.593110444 \n",
" 56 57 58 59 60 \n",
" 5.415896512 -4.372056108 0.798854068 -4.736502313 -6.194385838 \n",
" 61 62 63 64 65 \n",
" -3.360691877 -4.835128211 -5.960008729 -0.528372019 6.094056418 \n",
" 66 67 68 69 70 \n",
" -6.617110397 -5.425335497 -4.858441114 -4.717694839 -5.302907060 \n",
" 71 72 73 74 75 \n",
" -3.969509222 -3.467353264 -6.509568447 -3.990468752 -4.012506261 \n",
" 76 77 78 79 80 \n",
" -4.660399657 -3.181750115 -3.996834016 -1.630231854 -5.608391760 \n",
" 81 82 83 84 85 \n",
" -1.528079798 -3.794484545 -3.369509222 -4.518970233 -1.514366096 \n",
" 86 87 88 89 90 \n",
" -1.750018599 0.163793810 -4.335424334 -5.728569434 -0.438559563 \n",
" 91 92 93 94 95 \n",
" -3.583906073 -4.763436179 -3.901438153 -3.654034393 -3.892818223 \n",
" 96 97 98 99 100 \n",
" 0.163987323 -2.380281208 8.145866900 12.637835314 4.526964620 \n",
" 101 102 103 104 105 \n",
" 1.895624033 -0.766962336 -5.854816249 -2.485177565 -2.739732348 \n",
" 106 107 108 109 110 \n",
" 0.593471977 2.674080062 -0.767645485 -3.096735309 -0.380573428 \n",
" 111 112 113 114 115 \n",
" -0.503199281 -2.101339445 -0.353540855 0.382502576 -6.125825133 \n",
" 116 117 118 119 120 \n",
" -1.281063064 -1.915246660 -5.568332536 0.448417688 -2.323669175 \n",
" 121 122 123 124 125 \n",
" 1.098368334 -0.696636601 2.980544033 6.886913200 0.948026760 \n",
" 126 127 128 129 130 \n",
" 0.916390050 7.044504504 -2.022492488 -1.932581325 -2.829935731 \n",
" 131 132 133 134 135 \n",
" -3.383219022 -3.306235802 -0.989292066 -1.874599092 -2.508486566 \n",
" 136 137 138 139 140 \n",
" -0.341003840 -1.098006801 -3.592620808 -0.998788657 0.784070191 \n",
" 141 142 143 144 145 \n",
" 2.399351507 12.537357383 4.326482788 6.146463047 5.073104692 \n",
" 146 147 148 149 150 \n",
" 5.657531155 -3.135519139 8.101116537 10.151556819 1.224717759 \n",
" 151 152 153 154 155 \n",
" 0.341855009 -2.337185461 -7.739242712 -0.152561584 -3.189094651 \n",
" 156 157 158 159 160 \n",
" -4.684099586 -6.120044310 11.106885654 -4.145023535 -4.232976155 \n",
" 161 162 163 164 165 \n",
" -2.328569434 17.089744503 17.270253880 18.600322975 -0.795266402 \n",
" 166 167 168 169 170 \n",
" -0.233856719 18.961341730 0.779758275 -0.208293053 -1.499282195 \n",
" 171 172 173 174 175 \n",
" -3.444628705 -4.024747154 2.502384127 -2.365394721 -2.795365109 \n",
" 176 177 178 179 180 \n",
" -0.090077824 -1.748841913 -3.978030444 1.920500649 7.434407864 \n",
" 181 182 183 184 185 \n",
" 12.428532235 10.624125514 7.925397006 3.342439450 5.127849086 \n",
" 186 187 188 189 190 \n",
" 7.539308123 19.673878745 3.792488804 -0.421615826 5.466925137 \n",
" 191 192 193 194 195 \n",
" 7.291410825 0.401890590 4.572800766 1.324907370 -1.292624710 \n",
" 196 197 198 199 200 \n",
" 18.267805701 2.622360484 3.926084056 6.335485842 4.678384174 \n",
" 201 202 203 204 205 \n",
" 2.573878745 -3.394974181 10.700812611 17.565847158 18.182301259 \n",
" 206 207 208 209 210 \n",
" -1.626804404 0.268200531 5.104050449 3.773882647 7.382798699 \n",
" 211 212 213 214 215 \n",
" 3.553511460 7.528342624 3.075450261 2.457622059 17.220117524 \n",
" 216 217 218 219 220 \n",
" -0.556873499 1.581325890 3.352137359 3.971043540 -1.578322665 \n",
" 221 222 223 224 225 \n",
" 1.371138346 7.534218252 2.380149203 2.766534209 14.179363445 \n",
" 226 227 228 229 230 \n",
" 19.844887629 6.019813598 3.088473011 15.870352587 0.518344691 \n",
" 231 232 233 234 235 \n",
" 0.814234092 2.133918228 9.492781024 17.498854068 2.094056418 \n",
" 236 237 238 239 240 \n",
" -0.217303910 -0.390370045 1.439892564 -4.811526989 -4.251977142 \n",
" 241 242 243 244 245 \n",
" -1.742279234 -2.673228893 -1.694287130 -5.923084733 -5.078223957 \n",
" 246 247 248 249 250 \n",
" 1.484070191 -1.551388799 -4.410839939 -1.009371032 -2.121517119 \n",
" 251 252 253 254 255 \n",
" -4.548549692 -6.343163699 -1.600166661 11.609333833 -6.412016625 \n",
" 256 257 258 259 260 \n",
" -4.865884357 12.400812611 20.310411812 8.847043586 2.101499662 \n",
" 261 262 263 264 265 \n",
" 8.357132423 15.443517429 19.860950801 7.134214350 9.641558886 \n",
" 266 267 268 269 270 \n",
" -1.825825133 10.197389063 22.514526313 11.948315078 -0.885667201 \n",
" 271 272 273 274 275 \n",
" -1.103199281 -3.093015638 -2.809959375 6.897483868 1.199833339 \n",
" 276 277 278 279 280 \n",
" 0.277306195 4.393957711 2.498364432 1.377013974 5.153898486 \n",
" 281 282 283 284 285 \n",
" 14.418344691 5.206885654 14.305807675 18.448315078 5.104046548 \n",
" 286 287 288 289 290 \n",
" -4.734934698 -2.169702735 -4.570488494 -5.033465791 -0.718871525 \n",
" 291 292 293 294 295 \n",
" -2.890176531 6.128334820 -2.188608917 -2.502417424 -2.973327600 \n",
" 296 297 298 299 300 \n",
" 0.002968569 -0.432976155 0.794940884 -7.332095591 -1.050606943 \n",
" 301 302 303 304 305 \n",
" -3.987041302 -3.528372019 0.083087018 3.163398980 8.130001142 \n",
" 306 307 308 309 310 \n",
" 2.330099850 4.992978439 0.800030754 -7.440616813 -4.781848822 \n",
" 311 312 313 314 315 \n",
" -6.445217048 -6.772545744 -4.019262453 -5.448450985 -1.937382877 \n",
" 316 317 318 319 320 \n",
" -7.428273311 0.660563775 0.389945820 -1.611329574 -1.459712606 \n",
" 321 322 323 324 325 \n",
" -3.913485532 -4.927001819 -6.838460855 -4.900261466 -3.739538834 \n",
" 326 327 328 329 330 \n",
" -5.127590162 -5.711037354 -0.202709645 -5.781848822 -4.980478623 \n",
" 331 332 333 334 335 \n",
" -6.117892254 -5.644727412 -7.714954439 -6.957560550 -7.441007742 \n",
" 336 337 338 339 340 \n",
" -5.843945556 -5.743357213 -6.021319704 -5.868920879 -6.300360174 \n",
" 341 342 343 344 345 \n",
" -7.027882383 3.361930073 -9.835913969 -3.832486519 1.025886641 \n",
" 346 347 348 349 350 \n",
" -7.049821184 -5.316715567 -5.411526989 -4.363045250 -2.358050186 \n",
" 351 352 353 354 355 \n",
" -5.972545744 -5.238069927 -8.552956414 -0.178618787 -8.705943582 \n",
" 356 357 358 359 360 \n",
" -8.662065979 -0.032972253 -0.246685955 -0.947274298 0.083284433 \n",
" 361 362 363 364 365 \n",
" -2.152956414 -1.172640550 -4.072837965 -3.845118340 -7.628079798 \n",
" 366 367 368 369 370 \n",
" -0.289489481 0.646850073 1.210317006 18.543320014 18.989843210 \n",
" 371 372 373 374 375 \n",
" 18.258305208 24.500129462 23.882597382 12.279375151 15.319533083 \n",
" 376 377 378 379 380 \n",
" -6.785177565 1.425306102 -1.074792606 1.052828311 -3.661765955 \n",
" 381 382 383 384 385 \n",
" -7.803491501 -3.626800502 -0.832676131 1.079371249 3.346170826 \n",
" 386 387 388 389 390 \n",
" 1.917179710 2.813554845 3.238237947 4.736670333 -3.245311854 \n",
" 391 392 393 394 395 \n",
" -3.198496437 6.469084997 -0.456573475 -6.341592183 -6.320533945 \n",
" 396 397 398 399 400 \n",
" -5.188995943 -3.651384897 -7.128857753 -0.491831148 0.219138253 \n",
" 401 402 403 404 405 \n",
" -3.521019679 -8.048838011 -3.158338505 -7.471365156 -0.041489573 \n",
" 406 407 408 409 410 \n",
" -7.721706730 -0.479688963 4.870257782 7.727462060 11.738135338 \n",
" 411 412 413 414 415 \n",
" -9.948841913 2.806206407 15.999355409 0.823150144 7.578984223 \n",
" 416 417 418 419 420 \n",
" 0.245092847 -2.552068046 1.155473905 -6.163823205 -4.549718575 \n",
" 421 422 423 424 425 \n",
" -3.584099586 -5.438066025 -0.358144991 0.972808570 -6.550993969 \n",
" 426 427 428 429 430 \n",
" -3.082137141 -9.447566519 -9.859124263 -3.108778787 -2.176652441 \n",
" 431 432 433 434 435 \n",
" -3.294970279 -1.747369104 -7.024747154 -4.844040361 -8.441592183 \n",
" 436 437 438 439 440 \n",
" 0.953807583 -7.805450044 -0.725035472 6.166838135 -0.016711665 \n",
" 441 442 443 444 445 \n",
" -3.048249668 1.091122506 -0.392522101 -1.245410561 -1.152166753 \n",
" 446 447 448 449 450 \n",
" 0.028342624 -2.752462876 -6.335029504 -3.229446096 -3.208387858 \n",
" 451 452 453 454 455 \n",
" -4.584980150 -2.509465837 -2.046488540 -0.850014697 -1.878417471 \n",
" 456 457 458 459 460 \n",
" -3.229446096 -3.793402664 -4.960004827 -4.234539868 -0.588115379 \n",
" 461 462 463 464 465 \n",
" -2.554030491 -2.935617847 -1.762650420 -4.577833029 -0.594188423 \n",
" 466 467 468 469 470 \n",
" -1.229643511 0.739505538 4.801211343 1.770553904 -0.431112418 \n",
" 471 472 473 474 475 \n",
" 0.822463093 -2.726705697 2.288867841 6.323734585 -3.519945602 \n",
" 476 477 478 479 480 \n",
" 1.642348546 -0.106918951 1.111888523 -2.824451031 -0.698693852 \n",
" 481 482 483 484 485 \n",
" -1.350310820 -3.500458881 -2.893994910 -2.854326613 -1.280182500 \n",
" 486 487 488 489 490 \n",
" -3.302318717 -1.222101560 -3.075775779 -2.195949551 -4.781157870 \n",
" 491 492 493 494 495 \n",
" 1.743623940 -3.786449057 -1.770682007 -1.343748141 2.857329838 \n",
" 496 497 498 499 500 \n",
" 5.267027747 5.230202459 -2.858144991 -1.079203229 -2.708095638 \n",
" 501 502 503 504 505 \n",
" -4.139633640 -2.966863629 -5.327392747 -5.295562524 -6.397521067 \n",
" 506 \n",
"-15.167451972 \n"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"array(lm.fit[\"residuals\"])"
]
},
{
"cell_type": "code",
"execution_count": 13,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/w8PDx8fHy8vLz8/P09PT19fX29vb39/f4+Pj5+fn6+vr7+/v8/Pz9/f3+/v7////i\nsF19AAAACXBIWXMAABJ0AAASdAHeZh94AAAgAElEQVR4nOydZWATSxeGJ542dVekAi1S3F0K\nxS/uWtzdHS7u7nBxdy3uLh/u7l4opZr5spJqfCdJ057nBzPNzs4Oyb67I2fOQRgAAM4gczcA\nADIDICQAIAAICQAIAEICAAKAkACAACAkACAACAkACABCAgACgJAAgAAgJAAgAAgJAAgAQgIA\nAoCQAIAAICQAIAAICQAIAEICAAKAkACAACAkACAACAkACABCAgACgJAAgAAgJAAgAAgJAAgA\nQgIAAoCQAIAAICQAIAAICQAIAEICAAKAkACAACAkACAACAkACABCAgACgJAAgAAgJAAgAAgJ\nAAgAQgIAAoCQAIAAICQAIAAICQAIAEICAAKAkACAACAkACAACAkACABCAgACgJAAgAAgJAAg\nAAgJAAgAQgIAAoCQAIAAICQAIAAICQAIAEICAAKAkACAACAkACAACAkACABCAgACgJAAgAAg\nJAAgAAgJAAgAQgIAAoCQAIAAICQAIAAICQAIAEICAAKAkACAACAkACAACAkACABCAgACgJAA\ngAAgJAAgAAgJAAgAQgIAAoCQAIAAICQAIAAICQAIAEICAAKAkACAACAkACAACAkACABCAgAC\ngJAAgAAgJAAgAAgJAAgAQgIAAoCQAIAAICQAIAAICQAIAEICAAKAkACAACAkACAACAkACABC\nAgACgJAAgAAgJAAgAAgJAAgAQgIAAphASLeuAYBFcUv/u9z4QrqKAMDCuKr3bW58IZ1HsUa/\nBgAQJBad1/scEBIApAGEBAAEACEBAAFASABAABASABAAhAQABAAhAQABQEgAQAAQEgAQAIQE\nAAQAIQEAAUBIAEAAEBIAEACEBAAEACEBAAFASABAABASkNH5OKlx5e4H5OZuhmZASEAG54hD\nULfR9SX1Y8zdEI2AkICMzUvZ4ERF8sCnp7lbohEQEpCx6VeM6dTtF341c0s0AkICMjZFJzNp\ngvV+8zZEMyAkIGOTeymb8dxo1nZoAYQEZGyqDGLSn8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f217l+b3oBZdtknNU8imw62oHWVF/frmXhK5i4gXZ2J2j\nu7YbOFPVgqz87NEk5oCQAEI8shqWoEjO2E+m/+wl6bF5zziPEquEsxX32POK/r/IXCbjmAg9\nE6MURBnlGkDWo2NFJl1uzwzQd4a62xaf9sdrIsbxc0vI+NmWa7QN0BXTCundv417MTN3zzru\n1VBuCfpt8DUAICUBi5g0El1K8ekl3jf8N9R5zP7mXnYNEwhcxqRCOu2ieNfwZlPZS2ishoIg\nJIAUyoDnWHo4xae7HDEe7fUK47W+DxznELiMKYX0N6f1/Ifr86ADGIQEmIqQaUz6Dt1O8elJ\n4d9E96WKzMwQPCk3gcuYUkgH0HzFv2+8fKJBSICpGJGbsUsbkSPlWCjKesNb9Ahjecle+CKK\n5n4ZUwppFqJjTu9HU0BIgKn4lq264raLmSrclerjUc570HMc39/mBb6GCMzcmVJIa1lbu2r2\nH0BIgKl4WkIQWFTmtCH1pwkd+YKabXI4H1PcbV4ErmJKId1HHej0sbRmAggJMBmXl804mP6l\nc76gXas5XxWvrJxDCVzDlEJKDEP11r1TZGaiGvNASICZ+ZIrZMer5xtzFSKxJmvS6e/f5RFa\nQ2Um8BAICTA3X8NlCNn2StLRWw72NCa2bLiw5H90+mRY3WUaioGQAJOQ+OyFci7vUS0p4rlP\nMLSmjGMilBIQEmBirliL3Oo1zIYKG2jmAEICAIwTAoT94xXpbNTRsApASACA8Vl+UaaPV0D4\nx6AKQ
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 420,
"width": 420
},
"text/plain": {
"height": 420,
"width": 420
}
},
"output_type": "display_data"
}
],
"source": [
"plot(predict(lm.fit), residuals(lm.fit))"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA0gAAANICAMAAADKOT/pAAADAFBMVEUAAAABAQECAgIDAwME\nBAQFBQUGBgYHBwcICAgJCQkKCgoLCwsMDAwNDQ0ODg4PDw8QE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O4urL/x1Gd3Pru7lWeCgUiz89+JRWJ77u4S5/v56B127sxclvnN3Hvuuecg\nEgAAziBjNwAA8gIgJADAAAgJADAAQgIADICQAAADICQAwAAICQAwAEICAAyAkAAAAyAkAMAA\nCAkAMABCAgAMgJAAAAMgJADAAAgJADAAQgIADICQAAADICQAwAAICQAwAEICAAyAkAAAAyAk\nAMAACAkAMABCAgAMgJAAAAMgJADAAAgJADAAQgIADICQAAADICQAwAAICQAwAEICAAyAkAAA\nAyAkAMAACAkAMABCAgAMgJAAAAMgJADAAAgJADAAQgIADICQAAADICQAwAAICQAwAEICAAyA\nkAAAAyAkAMAACAkAMABCAgAMgJAAAAMgJADAAAgJADAAQgIADICQAAADICQAwAAICQAwAEIC\nAAyAkAAAAyAkAMAACAkAMABCAgAMgJAAAAMgJADAAAgJADAAQgIADICQAAADICQAwAAICQAw\nAEICAAyAkAAAAyAkAMAACAkAMABCAgAMgJAAAAMgJADAAAgJADAAQgIADICQAAADICQAwAAI\nCQAwAEICAAyAkAAAAyAkAMAACAkAMABCAgAMgJAAAAMgJADAAAgJADAAQgIADICQAAADICQA\nwAAICQAwAEICAAyAkAAAAyAkAMAACAkAMABCAgAMGEBId24AQK7ijvZ3uf6FdB0BQC7juta3\nuf6FdAkl6f0aAICRJHRJ62NASACQBRASAGAAhAQAGAAhAQAGQEgAgAEQEgBgAIQEABgAIQEA\nBkBIAIABEBIAYACEBAAYACEBAAZASACAARASAGAAhAQAGAAhAQAGjCKkby9SVVcAIQF/+DSj\nZY2+/0iN3QzVGEVIk9An1RVASEA6x6z9+0xoKm6aaOyGqMSQQvodxzIGvYyLS1ZRE4QEyHlj\nNjJNVjx272/slqjEkELyyBQrYpKKmiAkQM6QEKZTd4iINnJLVGJIIU0RoKB6FN6oer16W1XU\nBCEBcoJnMmWq6SHjNkQ1Bh0jXShkt4cqFY6R3vp5peOE4nW9BpDH8FvFbrhEGrUdajCsseFH\ne9T5pxIhJW9elU579EvnawB5i5ojmPIHccG4DVGNoa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2Xi1L/J22gf+RZI8U0hUzJLnew3HZUBIQN7GNZIp04hTGT49YiIl\nb5r0/0GuLNzJ6hmGy4CQgLyN6zamTCVOZ/j0gKXsXdVStrHBU1qrNYbLgJCAvE0dNtH5Jf6n\nDJ8+Qc9/Cc7KNgbUJfeaSblfBoQE5G12SW5SRUKFvzJ9HNLqOTWV9Mx8C3kHfed+GRASkLeR\ndjafePrW+kCPqEwf37asg869WusUmkaeIDAkQwchAXkc6dogISrQLzrLx4/q8BCynZRMkj2q\nYrgKCAnI+yT/VPTpNmIZVawhcLg3gJCAfMtsIqRPrxLi1TjOBUIC8i+PJ7VsPf0V+0P033PW\nPtT5VCAkAKCYIxbwEfLSdXIWhAQAMuYRwmFHLo+XiF/rdjwICQBI8odEcJ4q3xDFdTsBCAkA\nSHKvsCOz0QS91+kEICQAIMmlorXMxgz+EZ1OAEICAJLcKtjAbAzlh9aoO+KB1icAIQEASb7l\nNabLRHPk72km4oVp68dqFCElxaqpAEICDEwN3n7Z/wkhyMpiyNIehVAJLePeGVZI/47qvjM1\nrjmfV3idynogJMDA/HZHfu1DbXhCmyeTCI9Gtsj1qVbHG1RIKwUIocl9UUB1azRDZUUQEmBg\n0vraI
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 420,
"width": 420
},
"text/plain": {
"height": 420,
"width": 420
}
},
"output_type": "display_data"
}
],
"source": [
"plot(predict(lm.fit), rstudent(lm.fit))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Multiple regression\n",
"the function is `lm(yx1+x2+x3)`"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
2020-03-28 01:06:31 +00:00
"\n",
2020-08-01 22:25:45 +00:00
"Call:\n",
"lm(formula = medv ~ lstat + age, data = Boston)\n",
2020-03-28 01:06:31 +00:00
"\n",
2020-08-01 22:25:45 +00:00
"Residuals:\n",
" Min 1Q Median 3Q Max \n",
"-15.981 -3.978 -1.283 1.968 23.158 \n",
2020-03-28 01:06:31 +00:00
"\n",
2020-08-01 22:25:45 +00:00
"Coefficients:\n",
" Estimate Std. Error t value Pr(>|t|) \n",
"(Intercept) 33.22276 0.73085 45.458 < 2e-16 ***\n",
"lstat -1.03207 0.04819 -21.416 < 2e-16 ***\n",
"age 0.03454 0.01223 2.826 0.00491 ** \n",
"---\n",
"Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1\n",
2020-03-28 01:06:31 +00:00
"\n",
2020-08-01 22:25:45 +00:00
"Residual standard error: 6.173 on 503 degrees of freedom\n",
"Multiple R-squared: 0.5513,\tAdjusted R-squared: 0.5495 \n",
"F-statistic: 309 on 2 and 503 DF, p-value: < 2.2e-16\n"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"model = lm(medv~lstat+age, data=Boston)\n",
"summary(model)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# or just `lm(y~., data=DF)` to include all other rows"
]
},
{
"cell_type": "code",
"execution_count": 48,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
2020-03-28 01:06:31 +00:00
"\n",
2020-08-01 22:25:45 +00:00
"Call:\n",
"lm(formula = medv ~ ., data = Boston)\n",
2020-03-28 01:06:31 +00:00
"\n",
2020-08-01 22:25:45 +00:00
"Residuals:\n",
" Min 1Q Median 3Q Max \n",
"-15.595 -2.730 -0.518 1.777 26.199 \n",
2020-03-28 01:06:31 +00:00
"\n",
2020-08-01 22:25:45 +00:00
"Coefficients:\n",
" Estimate Std. Error t value Pr(>|t|) \n",
"(Intercept) 3.646e+01 5.103e+00 7.144 3.28e-12 ***\n",
"crim -1.080e-01 3.286e-02 -3.287 0.001087 ** \n",
"zn 4.642e-02 1.373e-02 3.382 0.000778 ***\n",
"indus 2.056e-02 6.150e-02 0.334 0.738288 \n",
"chas 2.687e+00 8.616e-01 3.118 0.001925 ** \n",
"nox -1.777e+01 3.820e+00 -4.651 4.25e-06 ***\n",
"rm 3.810e+00 4.179e-01 9.116 < 2e-16 ***\n",
"age 6.922e-04 1.321e-02 0.052 0.958229 \n",
"dis -1.476e+00 1.995e-01 -7.398 6.01e-13 ***\n",
"rad 3.060e-01 6.635e-02 4.613 5.07e-06 ***\n",
"tax -1.233e-02 3.760e-03 -3.280 0.001112 ** \n",
"ptratio -9.527e-01 1.308e-01 -7.283 1.31e-12 ***\n",
"black 9.312e-03 2.686e-03 3.467 0.000573 ***\n",
"lstat -5.248e-01 5.072e-02 -10.347 < 2e-16 ***\n",
"---\n",
"Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1\n",
2020-03-28 01:06:31 +00:00
"\n",
2020-08-01 22:25:45 +00:00
"Residual standard error: 4.745 on 492 degrees of freedom\n",
"Multiple R-squared: 0.7406,\tAdjusted R-squared: 0.7338 \n",
"F-statistic: 108.1 on 13 and 492 DF, p-value: < 2.2e-16\n"
2020-03-28 01:06:31 +00:00
]
},
"metadata": {},
"output_type": "display_data"
2020-08-01 22:25:45 +00:00
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA0gAAANICAIAAAByhViMAAAACXBIWXMAABJ0AAASdAHeZh94\nAAAgAElEQVR4nOzdZ0AU1+PG+7MUEZCigBUjokhVghERFDUWbLHHmqixxFiwoLGG2OMvlqix\nRSyowWjUxIIasWAFS9SAIEEBxYI0QZEmdfe+2P/lcsFYkWGX7+eVnDkMz+xaHqeclSkUCgEA\nAADVpyF1AAAAAJQNih0AAICaoNgBAACoCYodAACAmqDYAQAAqAmKHQAAgJqg2AEAAKgJih0A\nAICaoNgBAACoCYodAACAmqDYAQAAqAmKHQAAgJqg2AEAAKgJih0AAICaoNgBAACoCYodAACA\nmqDYAQAAqAmKHQAAgJqg2AEAAKgJih0AAICaoNgBAACoCYodAACAmqDYAQAAqAmKHQAAgJqg\n2AEAAKgJih0AAICaoNgBAACoCYodAACAmqDYAQAAqAmKHQAAgJqg2AEAAKgJih0AAICaoNgB\nAACoCYodAACAmqDYAQAAqAmKHQAAg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Q0NDU1Nz1qxZyqc+dXV1w8PDiy9Q/Opg\n/yU3N1f5KMb06dNLjL/t3t58geLi74impqanp+dLR179RrzJywuggpMp/v83owDAGzp48GBY\nWNiYMWNKL6gWGxv766+/CiFmzpyp/LQuhUJx/fr10NDQFy9e2NnZdejQQVm/ily5ciUsLOzZ\ns2f16
"text/plain": [
"Plot with title “”"
]
},
"metadata": {
"image/png": {
"height": 420,
"width": 420
},
"text/plain": {
"height": 420,
"width": 420
}
},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA0gAAANICAMAAADKOT/pAAADAFBMVEUAAAABAQECAgIDAwME\nBAQFBQUGBgYHBwcICAgJCQkKCgoLCwsMDAwNDQ0ODg4PDw8QEBARERESEhITExMUFBQVFRUW\nFhYXFxcYGBgZGRkaGhobGxscHBwdHR0eHh4fHx8gICAhISEiIiIjIyMkJCQlJSUmJiYnJyco\nKCgpKSkqKiorKyssLCwtLS0uLi4vLy8wMDAxMTEyMjIzMzM0NDQ1NTU2NjY3Nzc4ODg5OTk6\nOjo7Ozs8PDw9PT0+Pj4/Pz9AQEBBQUFCQkJDQ0NERERFRUVGRkZHR0dISEhJSUlKSkpLS0tM\nTExNTU1OTk5PT09QUFBRUVFSUlJTU1NUVFRVVVVWVlZXV1dYWFhZWVlaWlpbW1tcXFxdXV1e\nXl5fX19gYGBhYWFiYmJjY2NkZGRlZWVmZmZnZ2doaGhpaWlqampra2tsbGxtbW1ubm5vb29w\ncHBxcXFycnJzc3N0dHR1dXV2dnZ3d3d4eHh5eXl6enp7e3t8fHx9fX1+fn5/f3+AgICBgYGC\ngoKDg4OEhISFhYWGhoaHh4eIiIiJiYmKioqLi4uMjIyNjY2Ojo6Pj4+QkJCRkZGSkpKTk5OU\nlJSVlZWWlpaXl5eYmJiZmZmampqbm5ucnJydnZ2enp6fn5+goKChoaGioqKjo6OkpKSlpaWm\npqanp6eoqKipqamqqqqrq6usrKytra2urq6vr6+wsLCxsbGysrKz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AAcICQADhAS\nQDrzK
"text/plain": [
"Plot with title “”"
]
},
"metadata": {
"image/png": {
"height": 420,
"width": 420
},
"text/plain": {
"height": 420,
"width": 420
}
},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA0gAAANICAIAAAByhViMAAAACXBIWXMAABJ0AAASdAHeZh94\nAAAgAElEQVR4nOzddzyV/+M//qfj2BkZlZFsQomGWRRpR9pLJamkdykpvbwa2vul16uh7dVO\nRWhPoahsmZUkJZGd7fz+OL/b+frQS+s4l3N53P9yntd1zvW4Gjxc43kJsFgsAgAAAAD8j0F1\nAAAAAADgDhQ7AAAAAJpAsQMAAACgCRQ7AAAAAJpAsQMAAACgCRQ7AAAAAJpAsQMAAACgCRQ7\nAAAAAJpAsQMAAACgCRQ7AAAAAJpAsQMAAACgCRQ7AAAAAJpAsQMAAACgCRQ7AAAAAJpAsQMA\nAACgCRQ7AAAAAJpAsQMAAACgCRQ7AAAAAJpAsQMAAACgCRQ7AAAAAJpAsQMAAACgCRQ7AAAA\nAJpAsQMAAACgCRQ7AAAAAJpAsQMAAACgCRQ7AAAAAJpAsQMAAACgCRQ7AAAAAJpAsQMAAACg\nCRQ7AAAAAJpAsQMAAACgCRQ7AAAAAJpAsQMAAACgCRQ7AAAAAJpAsQMAAACgCRQ7AAAAAJpA\nsQMAAACgCRQ7AAAAAJpAsQMAAACgCRQ7AAAAAJpAsQMAAACgCRQ7AAAAAJpAsQMAAACgCRQ7\nAAAAAJpAsQMAAACgCRQ7AAAAAJpAsQMAAACgCRQ7AAAAAJpAsQMAAACgCRQ7AAAAAJpAsQMA\nAACgCRQ7AAAAAJpAsQMAAACgCRQ7AAAAAJpAsQMAAACgCRQ7AAAAAJpAsQMAAACgCRQ7AAAA\nAJpAsQMAAACgCRQ7AAAAAJpAsQMAAACgCRQ7AAAAAJpAsQMAAACgCRQ7AAAAAJpAsQMAAACg\nCRQ7AAAAAJpAsQMAAACgCRQ7AAAAAJpAsQMAAAC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y8ufPXuWfdyL7fTp076+vmVlZXl5eR8/frSysuJU\nIkJIbGzsNzfHZDIHDRoUFhaWn5/PGfz48aOysrKpqekv74W8vLyurm5oaOinT584g+np6ZGR\nkebm5gwGg4u78LOb/uWdAgAawLcAAOCpjRs3ysjIuLu7Ozs7h4SEpKamJiYmXrx4cdiwYWlp\naT4+Pt26dRMVFV23bt2HDx/GjBkTFxdXVFR04cKFTZs2aWlp2djYKCkpSUtL37hx486dO7W1\ntR8/fty0adOaNWsIIc3bG8e2bdsqKyutrKzCw8M/f/6cmJg4derU4uLiFStWfDftly9fclsp\nKioihGzZsqW6utrOzi4iIuLz58+3bt0aNWpUU1PT1q1bCSHc2oXXr1+3Pvfa9qYBoFOj8pZc\nAOiUEhIS+vfv3+J7kZSUlI+PD2fW4oaGhj///LP58SdNTc24uDj20vPnz7On52Wv0Lt378eP\nH7OnIJ41axar1QTFp0+flpSU5HyUsLDwxo0b2w7Z+pgix7Rp09jr+Pv7N58lWEpK6uzZs5xP\n+M1dyMzMFBQUJIQICgoWFRW1mKC47U2zpztpPpcKi8WSl5e3s7P76b8tAOArAqz/uA4XAKBd\nJSUlPXv2rKioqGvXrmpqaubm5tLS0i3Wef36dWxs7MePH3V0dIYPH978eVy5ubn37t0rLy83\nMjKytLQUERFJS0u7c+dOnz59bG1tg4ODk5OTfX192d2IEPL58+eYmJiMjAwlJaUhQ4Z891q0\nuLi48PDwby4yNDScOHEi++v8/HzOc73MzMyaP9/iN3eBEJKVlcWe9M7NzS00NLTFI8Xa2HRY\nWFh8fLy3t7eYmBhncNeuXT169Jg9e3bbOw4AfA3FDgAAAIAmcI0dAAAAAE2g2AEAAADQBIod\nAAAAA
"text/plain": [
"Plot with title “”"
]
},
"metadata": {
"image/png": {
"height": 420,
"width": 420
},
"text/plain": {
"height": 420,
"width": 420
}
},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA0gAAANICAIAAAByhViMAAAACXBIWXMAABJ0AAASdA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NzW/evBkXF6epqSntoBw9enSTJk2yDpBIJElJSdJCTTpbY2FhYWFhAeD169c///yz\nu7v72rVrly9fnvO0jRo1Cg4OTk1NzTlpFxERkevqkk9Xx/n333+zfv7zzz+9vLzWrl07bdq0\nrMEvvWij8MGydO3atWrVqseOHZs4ceKpU6ecnJyqVKlS5LPlr8AvNv88hfn45wr8Ag0MDPz8\n/J48eZJz0k56V7c41yWi0iNf8CFEVLFJ/w/97t07ANbW1gCkT5hlmT9/vrq6+smTJwF069ZN\nWVn57du30l1aWlozZ84E8ObNm1yntbOzS0hI2L59e9ZIenp6ztcXKygoAHj69GnWyPv37y9c\nuJC1ee3aNQBOTk5ZI4mJiXfu3Mnztyh8sCzKysqOjo5Xrlz5448/EhISsu57Fu1s+Svwi80/\nT2E+/rkCv0BbW1sA+/btyxp58ODB1atXi3ldIipFoj7hR0RlRT7vsZs0aRKAM2fOSDc7deoE\nYPr06aGhoXFxce7u7goKCo0bN5a+3mLx4sUAevbsGRQU9OLFi7Nnz3br1g3A4cOHJZ82T7x8\n+VJDQ0NZWXn9+vXR0dHXr1/v2rVr5cqV8V/zREJCgqKiYtWqVX19fTMyMu7fv29vby/9g0va\nPLFq1SoA48ePj4qKSk5OvnjxYuvWrQEoKyu/fv1a8mnzRP7BvuTUqVMAqlatqqOjk56enjVe\nhLPp6
"text/plain": [
"Plot with title “”"
]
},
"metadata": {
"image/png": {
"height": 420,
"width": 420
},
"text/plain": {
"height": 420,
"width": 420
}
},
"output_type": "display_data"
2020-03-28 01:06:31 +00:00
}
],
"source": [
2020-08-01 22:25:45 +00:00
"model = lm(medv~., data=Boston)\n",
"summary(model)\n",
"plot(model)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can use the vif function in the car package to check for correlation of features"
2020-03-28 01:06:31 +00:00
]
},
{
"cell_type": "code",
2020-08-01 22:25:45 +00:00
"execution_count": 29,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<style>\n",
".dl-inline {width: auto; margin:0; padding: 0}\n",
".dl-inline>dt, .dl-inline>dd {float: none; width: auto; display: inline-block}\n",
".dl-inline>dt::after {content: \":\\0020\"; padding-right: .5ex}\n",
".dl-inline>dt:not(:first-of-type) {padding-left: .5ex}\n",
"</style><dl class=dl-inline><dt>crim</dt><dd>1.79219154743324</dd><dt>zn</dt><dd>2.29875817874944</dd><dt>indus</dt><dd>3.99159641834602</dd><dt>chas</dt><dd>1.07399532755379</dd><dt>nox</dt><dd>4.39371984757749</dd><dt>rm</dt><dd>1.93374443578326</dd><dt>age</dt><dd>3.10082551281534</dd><dt>dis</dt><dd>3.95594490637272</dd><dt>rad</dt><dd>7.48449633527446</dd><dt>tax</dt><dd>9.00855394759705</dd><dt>ptratio</dt><dd>1.7990840492489</dd><dt>black</dt><dd>1.34852107640638</dd><dt>lstat</dt><dd>2.94149107809193</dd></dl>\n"
],
"text/latex": [
"\\begin{description*}\n",
"\\item[crim] 1.79219154743324\n",
"\\item[zn] 2.29875817874944\n",
"\\item[indus] 3.99159641834602\n",
"\\item[chas] 1.07399532755379\n",
"\\item[nox] 4.39371984757749\n",
"\\item[rm] 1.93374443578326\n",
"\\item[age] 3.10082551281534\n",
"\\item[dis] 3.95594490637272\n",
"\\item[rad] 7.48449633527446\n",
"\\item[tax] 9.00855394759705\n",
"\\item[ptratio] 1.7990840492489\n",
"\\item[black] 1.34852107640638\n",
"\\item[lstat] 2.94149107809193\n",
"\\end{description*}\n"
],
"text/markdown": [
"crim\n",
": 1.79219154743324zn\n",
": 2.29875817874944indus\n",
": 3.99159641834602chas\n",
": 1.07399532755379nox\n",
": 4.39371984757749rm\n",
": 1.93374443578326age\n",
": 3.10082551281534dis\n",
": 3.95594490637272rad\n",
": 7.48449633527446tax\n",
": 9.00855394759705ptratio\n",
": 1.7990840492489black\n",
": 1.34852107640638lstat\n",
": 2.94149107809193\n",
"\n"
],
"text/plain": [
" crim zn indus chas nox rm age dis \n",
"1.792192 2.298758 3.991596 1.073995 4.393720 1.933744 3.100826 3.955945 \n",
" rad tax ptratio black lstat \n",
"7.484496 9.008554 1.799084 1.348521 2.941491 "
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"library(car)\n",
"vif(model)"
]
},
{
"cell_type": "code",
"execution_count": 49,
"metadata": {},
"outputs": [],
"source": [
"model = lm(medv~.-tax, data=Boston)"
]
},
{
"cell_type": "code",
"execution_count": 50,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA0gAAANICAIAAAByhViMAAAACXBIWXMAABJ0AAASdAHeZh94\nAAAgAElEQVR4nOz9Z0AU5/v+f19LFZUi8hFUkCI2xA4q2MACYo8aa+zYjWiMomhiTeyxxS4a\neyyxayyxg51YEAuiqCgIIiK97/1gf39uvmDs7rDD+/VIzrkYjt015mB2ZlahVCoFAAAANJ+W\n1AEAAADwZVDsAAAAZIJiBwAAIBMUOwAAAJmg2AEAAMgExQ4AAEAmKHYAAAAyQbEDAACQCYod\nAACATFDsAAAAZIJiBwAAIBMUOwAAAJmg2AEAAMgExQ4AAEAmKHYAAAAyQbEDAACQCYodAACA\nTFDsAAAAZIJiBwAAIBMUOwAAAJmg2AEAAMgExQ4AAEAmKHYAAAAyQbEDAACQCYodAACATFDs\nAAAAZIJiBwAAIBMUOwAAAJmg2AEAAMgExQ4AAEAmKHYAAAAyQbEDAACQCYodAACATFDsAAAA\nZIJiBwAAIBMUOwAAAJmg2AEAAMgExQ4AAEAmKHYAAAAyQbEDAACQCYodAACATFDsAAAAZIJi\nBwAAIBMUOwAAAJmg2AEAAMgExQ4AAEAmKHYAAAAyQbEDAACQCYodAACATFDsAAAAZIJiBwAA\nIBMUOwAAAJmg2AEAAMgExQ4AAEAmKHYAAAAyQbEDAACQCYodAACATFDsAAAAZIJiBwAAIBMU\nOwAAAJmg2AEAAMgExQ4AAEAmKHYAAAAyQbEDAACQCYodAACATFDsAAAAZIJiBwAAIBMUOwAA\nAJmg2AEAAMgExQ4AAEAmKHYAAAAyQbEDAACQCYod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ZUrlw5d4FSqUxJSVE1CdVBI2dnZ2dn\nZyFEXFycn5/f6tWrFy1aNGfOnLy7tbOzu3XrVkZGRt6jSvneWlXtPO+Xz549y/3zjh07Tp48\nuWjRojFjxuQO893vI9eHB8vl6elpbGy8b9++kSNHHjp0qFOnTrnvmX7C3r6s974QH/j0AijM\nuCoWwJenKgpv3rwRQjRq1EgIsWrVqrwLpkyZUrJkyYMHDwohWrduraenFx8fr9pkamo6btw4\nIcTr16/z7bZZs2ZJSUl5P94qKysr7x16tbW1hRBRUVG5k4SEBNW5ZSpXrlwRQnTq1Cl3kpyc\nHBIS8tZH8eHBcunp6XXs2PHChQsbN25MSkrKfR/20/b2Zb33hXjv0wug8KPYAfjyVMUuNjZW\nCNGqVavmzZsvWrTohx9+CAkJefny5Zo1a+bOnVupUiXVfdrc3NxycnK+++6769evx8bGHjt2\nbPTo0apvzLfbcePGGRoajhkzZunSpU+ePLl27Vq7du2eP3+eu6BSpUo6Ojr+/v5nz57NyckJ\nDQ3t3Lnzy5cvcxdUq1ZNCDF37tzw8PD09PRz5865ubk9f/48JSWlYMH68GB5devWLScnx9fX\n18LCIu/KT9vbx4qOjk5KSsp7zDJ38t4X4r1PLwANIOld9ABosHfcoHjevHlCiC5duqi+fPHi\nhaenZ95/eWrUqBEaGqramp6enm+rrq6un5+fauu7b1BcunTp3bt3izx30F20aJGWlpb4/47e\n6erqqg6bqW5QnJKS0rBhQ9X3amlpaWtr+/r6qq76NDAwCA4OznuD4ncH+y/p6emqSzHGjRuX\nb/6xe/vwGxTnfUW0tbVHjRr11sm7X4gPeXoBFHIK5f89GQUAPtDevXtv3brl7e1d8IZq4eHh\nmzZtEkJMmDBB9WldSqXy2rVrN27cSE1NdXBwaN68uap+5bp06dKtW7dev35tZWXVpEkTKysr\n1fytH
"text/plain": [
"Plot with title “”"
]
},
"metadata": {
"image/png": {
"height": 420,
"width": 420
},
"text/plain": {
"height": 420,
"width": 420
}
},
"output_type": "display_data"
},
{
"data": {
"image/png": "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nmia\nphrl/hoKwMVoGdIs+pOxRbRHXt5DczLdeid2YJoWdNvJbQDoQsuQLvs8cotdCX1NXu5Gub3b\nMA0hgXvR9F27JYbi7y38THhuwXet6I3c7oiQwM1o+znSoofIJmBQcm73Q0jgZrTes2H1iNde\nfLnf1zdzvxdCAjfjmrsIISRwMwgJgAOEBMABQgLgACEBcICQADhASAAZnXm6aMiTR6SFJQ39\n62xh7EavyIhuef1CIiSADFJq11z+c80KCWyhZdyqdmFXUhpW+2NV7cfz+C6EBJDBITrM2Cra\nzaoPkR6NWq5eR0cZO2/aKt20e2CrVgN3Z/tdCAkgg1NjkxjbRqeP0F7r19MD5D+jxzA20tBw\nwICGhpHZfRdCAsjs7y8qvMLW0i81/B/9my2nM4xds/Rj882/yDf+Yl6QzbcgJIDMhlTzGc3m\nU5l5/3S3HI5/oO6aNQ2Nr7Dq/W239q+RzbcgJICsNplWLqXfGEuOfo+dbBdcblyNobdpo+22\nDcKdrN+AkAAy2GQ9drvq0K10Trps29V6ZUrYtPOpx6IeovNZvwshAWQw21d6wLlfZGJcqPSS\nKKHUiCstNzH2p+l8gmWZ7Q5LLQlZvwshAWRwvfST6/55OuwiG1b8h42dQi6xBlWW/BrVh7Gn\nmqfItyc3eyqb70JIABmdbB8e1ma/tDC8QlDLA4yd7xDw4AipoUOBnS8wdqFzYHbTjSAkgHza\nHkOlS1PM9uxuQ0gA+ZW8ffbsbdnPNoKQADhASAAcICQADhASAAcICYADhATAAUIC4AAhAXCA\nkAA4Q
"text/plain": [
"Plot with title “”"
]
},
"metadata": {
"image/png": {
"height": 420,
"width": 420
},
"text/plain": {
"height": 420,
"width": 420
}
},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA0gAAANICAIAAAByhViMAAAACXBIWXMAABJ0AAASdAHeZh94\nAAAgAElEQVR4nOzdeUBN+eM//lf33rRpUaEklWgnUlmKFipEZSLMUGSJGEJqZIbRjGWGYTKW\nspWxpyEJFQZtypRSF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cOHH\njx83b97cZdrS0tLcdj58+EAI2b17d11d3YwZMx49evT+/fuwsLBZs2ax2ew9e/YQQrrrFLKy\nstp/99r5RwNAv0blLbkA0C8lJSVNmDChze8iCQmJbdu28XYtbm5u/uGHH1qvP6mqqiYmJnKP\nXrp0ibs9L3eCpqZmZGQkdwviJUuWcNptUHzu3DlxcXHeWw0YMGDXrl2dh2y/psizaNEi7hwf\nH5/WuwRLSEhcuHCB9w7/8RRevXrFZDIJIUwm88OHD202KO78o7nbnbTeS4XD4cjKys6YMeOz\n/2kBQJ8iwPmX63ABAHrUs2fPnjx58uHDh0GDBikrK0+ePFlSUrLNnKysrPj4+KKiIjU1NQsL\ni9bP48rNzb13715lZaWurq6RkZGQkFBaWlpERMSYMWOmT59+/fr1lJSU77//ntuNCCHv37+P\ni4t7+fLlsGHDpk2b1uW1aImJiaGhoR0e0tHRsbe35/65oKCA91yvSZMmtX6+xX88BULI69ev\nuZverV69OiQkpM0jxTr56Js3bz59+tTDw0NERIQ3uH//fjk5uaVLl3Z+4gDQp6HYAQAAANAE\nrrEDA
"text/plain": [
"Plot with title “”"
]
},
"metadata": {
"image/png": {
"height": 420,
"width": 420
},
"text/plain": {
"height": 420,
"width": 420
}
},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA0gAAANICAIAAAByhViMAAAACXBIWXMAABJ0AAASdAHeZh94\nAAAgAElEQVR4nOzdeVxN6R8H8E/7olRCTZbSYikkQloUFdm3ZGeMDDP2ZSyNwQwGM4wGP9uM\nfR37vpWEZC9Sok0JEUaU9rq/P66pJBVyTt0+7z/m5Tzn3HM/9w75es75nkdOIpGAiIiIiCo+\nebEDEBEREVHZYGFHREREJCNY2BERERHJCBZ2RERERDKChR0RERGRjGBhR0RERCQjWNgRERER\nyQgWdkREREQygoUdERERkYxgYUdEREQkI1jYEREREckIFnZEREREMoKFHREREZGMYGFHRERE\nJCNY2BERERHJCBZ2RERERDKChR0RERGRjGBhR0RERCQjWNgRERERyQgWdkREREQygoUdERER\nkYxgYUdEREQkI1jYEREREckIFnZEREREMoKFHREREZGMYGFHREREJCNY2BERERHJCBZ2RERE\nRDKChR0RERGRjGBhR0RERCQjWNgRERERyQgWdkREREQygoUdERERkYxgYUdEREQkI1jYERER\nEckIFnZEREREMoKFHREREZGMYGFHREREJCNY2BERERHJCBZ2RERERDKChR0RERGRjGBhR0RE\nRCQjWNgRERERyQgWdkREREQygoUdERERkYxgYUdEREQkI1jYEREREckIFnZEREREMoKFHRER\nEZGMYGFHREREJCNY2BERERHJCBZ2RERERDKChR0RERGRjGBhR0RERCQjWNgRERERyQgWdkRE\nREQygoUdERERkYxgYUdEREQkI1jYEREREckIFnZEREREMoKFHREREZGMYGFHREREJCNY2BER\nERHJCBZ2RERERDKChR0RERGRjGBhR0RERCQjWNgRERERyQgWdkREREQygoUdERERkYxgYUdE\nREQkI1jYEREREckIRbEDEFG5cODAgZCQkEKDWlpaJiYm7dq109DQKJN3efr06Zo1a5ycnBwd\nHYs84P79+1u2bOnevbuVldXnv93Lly+XL19ub2/v7Oz8+Wf7TEuXLs3MzJw5c6bYQYhIlslJ\nJBKxMxCR+IYMGbJt27Yid+nr62/YsKFTp06f/y63bt1q1qzZ3Llz58yZU+QBZ86ccXFx+fvv\nv0eMGPH5bxcdHW1qajpjxoyFCxd+/tk+01dffZWSkpKcnCx2ECKSZZyxI6J8e/bsyZsqy83N\nTUxM3Lp169q1awcPHhweHl6zZs3PPH+1atU8PT2bN2/+2UmJiKgILOyIKF+dOnVMTEzyNs3M\nzOzs7GJiYnx8fPz9/T08PD7//H/99ddnnoSIiD6EhR0RlcDJycnHxycqKqrgYGho6PXr11++\nfNm0adP27dvLyckV3Hv//v2AgICEhIRatWo5Ozvr6+tLx589e7Zq1aqC99i9fv06MDAwPDzc\n3Nzc1ta24EkSEhLWrVvXoUOHNm3a5A2eOXMmICBg/PjxOjo60pH09PTAwMC7d+9mZGQYGRm5\nubmpqal96LN8KFgh8fHxGzZsaN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+MUWn6c0L39fiV+gg4MDgO3bt+eNREdHX758+TPfl4i+IFHv8COi8qKY59iNHTsWwPHjx6Wb\n7du3BzBp0qTQ0NDExMS1a9cqKCiYmZlJH28xf/58AF26dAkKCnr27NnJkyfd3NwA7NmzR/Ju\n88Tz5881NTWVlZX//PPP2NjYa9eudezYsUqVKviveSIlJUVRUVFLS8vf3z8nJ+fevXvOzs7S\nH1zS5onff/8dwOjRo2NiYtLT08+dO2dtbQ1AWVn533//lbzbPFF8sA85evQoAC0tLX19/ezs\n7LzxT
"text/plain": [
"Plot with title “”"
]
},
"metadata": {
"image/png": {
"height": 420,
"width": 420
},
"text/plain": {
"height": 420,
"width": 420
}
},
"output_type": "display_data"
}
],
"source": [
"plot(model)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# As we see, there's a clear nonlinearity. Especially when the graph is drawn\n",
"\n",
"quick note:\n",
"y~x1:x2 does y ~ x1 * x2 \n",
" \n",
" \n",
"y~x1 * x2 does y ~ x1,x2, `x1 * x2`"
]
},
{
"cell_type": "code",
"execution_count": 66,
2020-03-28 01:06:31 +00:00
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"\n",
"Call:\n",
2020-08-01 22:25:45 +00:00
"lm(formula = medv ~ . + lstat:age, data = Boston)\n",
2020-03-28 01:06:31 +00:00
"\n",
"Residuals:\n",
2020-08-01 22:25:45 +00:00
" Min 1Q Median 3Q Max \n",
"-15.4559 -2.7480 -0.5557 1.8049 26.2582 \n",
2020-03-28 01:06:31 +00:00
"\n",
"Coefficients:\n",
2020-08-01 22:25:45 +00:00
" Estimate Std. Error t value Pr(>|t|) \n",
"(Intercept) 38.034385 5.467840 6.956 1.12e-11 ***\n",
"crim -0.111723 0.033199 -3.365 0.000825 ***\n",
"zn 0.043109 0.014336 3.007 0.002774 ** \n",
"indus 0.018945 0.061550 0.308 0.758365 \n",
"chas 2.709592 0.862357 3.142 0.001779 ** \n",
"nox -18.026578 3.834758 -4.701 3.37e-06 ***\n",
"rm 3.759388 0.422759 8.893 < 2e-16 ***\n",
"age -0.010315 0.019023 -0.542 0.587897 \n",
"dis -1.475346 0.199527 -7.394 6.19e-13 ***\n",
"rad 0.307676 0.066401 4.634 4.61e-06 ***\n",
"tax -0.012335 0.003762 -3.279 0.001116 ** \n",
"ptratio -0.958239 0.131052 -7.312 1.08e-12 ***\n",
"black 0.009187 0.002691 3.414 0.000694 ***\n",
"lstat -0.635696 0.146950 -4.326 1.84e-05 ***\n",
"age:lstat 0.001257 0.001562 0.804 0.421562 \n",
2020-03-28 01:06:31 +00:00
"---\n",
"Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1\n",
"\n",
2020-08-01 22:25:45 +00:00
"Residual standard error: 4.747 on 491 degrees of freedom\n",
"Multiple R-squared: 0.741,\tAdjusted R-squared: 0.7336 \n",
"F-statistic: 100.3 on 14 and 491 DF, p-value: < 2.2e-16\n"
2020-03-28 01:06:31 +00:00
]
},
"metadata": {},
"output_type": "display_data"
2020-08-01 22:25:45 +00:00
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA0gAAANICAIAAAByhViMAAAACXBIWXMAABJ0AAASdAHeZh94\nAAAgAElEQVR4nOzdeVzN6cP/8eu0r0pFKFOKKCVLZN9JhlCmYb6YkX35jiWMXXYNo2xDtrEz\nozH23chStowt1SC7IaSU9jrn98f53d3dZazVp3N6Pf+Yh3NdV5/e5zTTvH1WmUKhEAAAAFB9\nGlIHAAAAQNGg2AEAAKgJih0AAICaoNgBAACoCYodAACAmqDYAQAAqAmKHQAAgJqg2AEAAKgJ\nih0AAICaoNgBAACoCYodAACAmqDYAQAAqAmKHQAAgJqg2AEAAKgJih0AAICaoNgBAACoCYod\nAACAmqDYAQAAqAmKHQAAgJqg2AEAAKgJih0AAICaoNgBAACoCYodAACAmqDYAQAAqAmKHQAA\ngJqg2AEAAKgJih0AAICaoNgBAACoCYodAACAmqDYAQAAqAmKHQAAgJqg2AEAAKgJih0AAICa\noNgBAACoC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7nbTHmD4rS0tMaNGyu/VkNDQ1NT84cfflBe9amvr3/jxo38Nyh+d7B/k5mZ\nqbwUw9/fv8D4x27tw29QnP8noqmpOXLkyLeOvPsH8SEfL4BSTqb4vyejAMAH+uOPP65fvz5w\n4MDCN1S7d+/epk2bhBATJkxQPq1LoVBERkZevXo1PT3dycmpbdu2yvqV5/z589evX09MTKxa\ntWqLF
"text/plain": [
"Plot with title “”"
]
},
"metadata": {
"image/png": {
"height": 420,
"width": 420
},
"text/plain": {
"height": 420,
"width": 420
}
},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA0gAAANICAMAAADKOT/pAAADAFBMVEUAAAABAQECAgIDAwME\nBAQFBQUGBgYHBwcICAgJCQkKCgoLCwsMDAwNDQ0ODg4PDw8QEBARERESEhITExMUFBQVFRUW\nFhYXFxcYGBgZGRkaGhobGxscHBwdHR0eHh4fHx8gICAhISEiIiIjIyMkJCQlJSUmJiYnJyco\nKCgpKSkqKiorKyssLCwtLS0uLi4vLy8wMDAxMTEyMjIzMzM0NDQ1NTU2NjY3Nzc4ODg5OTk6\nOjo7Ozs8PDw9PT0+Pj4/Pz9AQEBBQUFCQkJDQ0NERERFRUVGRkZHR0dISEhJSUlKSkpLS0tM\nTExNTU1OTk5PT09QUFBRUVFSUlJTU1NUVFRVVVVWVlZXV1dYWFhZWVlaWlpbW1tcXFxdXV1e\nXl5fX19gYGBhYWFiYmJjY2NkZGRlZWVmZmZnZ2doaGhpaWlqampra2tsbGxtbW1ubm5vb29w\ncHBxcXFycnJzc3N0dHR1dXV2dnZ3d3d4eHh5eXl6enp7e3t8fHx9fX1+fn5/f3+AgICBgYGC\ngoKDg4OEhISFhYWGhoaHh4eIiIiJiYmKioqLi4uMjIyNjY2Ojo6Pj4+QkJCRkZGSkpKTk5OU\nlJSVlZWWlpaXl5eYmJiZmZmampqbm5ucnJydnZ2enp6fn5+goKChoaGioqKjo6OkpKSlpaWm\npqanp6eoqKipqamqqqq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zpQsr0JIABwgJAAOEBIABwgJgAOEBMABQgLgACEBcICQADhASAAcICSADA6/\n0rL/L
"text/plain": [
"Plot with title “”"
]
},
"metadata": {
"image/png": {
"height": 420,
"width": 420
},
"text/plain": {
"height": 420,
"width": 420
}
},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA0gAAANICAIAAAByhViMAAAACXBIWXMAABJ0AAASdAHeZh94\nAAAgAElEQVR4nOzdeTxU++M/8PcwtiyhkSyVKKKkRRuKNkTRoptKe9rUFZWWW1pEt3SV9lJU\ntOq2SKs22VJJluxauCFLSHZmfn/M4zdfH0obc8bxev5l3ueM8zo31+PlPee8D4PD4RAAAAAA\naPuEqA4AAAAAAC0DxQ4AAACAJlDsAAAAAGgCxQ4AAACAJlDsAAAAAGgCxQ4AAACAJlDsAAAA\nAGgCxQ4AAACAJlDsAAAAAGgCxQ4AAACAJlDsAAAAAGgCxQ4AAACAJlDsAAAAAGgCxQ4AAACA\nJlDsAAAAAGgCxQ4AAACAJlDsAAAAAGgCxQ4AAACAJlDsAAAAAGgCxQ4AAACAJlDsAAAAAGgC\nxQ4AAACAJlDsAAAAAGgCxQ4AAACAJlDsAAAAAGgCxQ4AAACAJlDsAAAAAGgCxQ4AAACAJlDs\nAAAAAGgCxQ4AAACAJlDsAAAAAGgCxQ4AAACAJlDsAAAAAGgCxQ4AAACAJlDsAAAAAGgCxQ4A\nAACAJlDsAAAAAGgCxQ4AAACAJlDsAAAAAGgCxQ4AAACAJlDsAAAAAGgCxQ4AAACAJlDsAAAA\nAGgCxQ4AAACAJlDsAAAAAGgCxQ4AAACAJlDsAAAAAGgCxQ4AAACAJlDsAAAAAGgCxQ4AAACA\nJlDsAAAAAGgCxQ4AAACAJlDsAAAAAGgCxQ4AAACAJlDsAAAAAGgCxQ4AAACAJlDsAAAAAGgC\nxQ4AAACAJlDsAAAAAGgCxQ4AAACAJlDsAAAAAGgCxQ4AAACAJlDsAAAAAGgCxQ4AAACAJ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DyC8/p4n6wy52Wayg9PV1MTKxr167FxcUtdQo/e+ifPRcAoBNc\nYwcAfDVmzJj3799zb01oqLKy8vr16wwGw8jIqHfv3iwW6+zZs9x5Ly5/f/9NmzaVlpZmZ2fn\n5uYaGRnxKhEhJDo6+quHYzKZQ4YMuXHjxocPH3iDubm5KioqQ4cO/eWzYLFYWlpaQUFBHz9+\n5A0mJyeHhYUNHz5cSEioBU/hZw/9yycFADSAXwEAwFfbtm2TlZVdvnz5nDlzrl27lpiY+OrV\nq4sXL44ePTopKWnDhg2dO3cWFxd3dXXNycmxtLSMiYkpLCy8cOGCm5tbz549TUxMlJWVO3bs\neOvWrXv37lVXV+fm5rq5ua1fv54Q0rC98ezcufPLly9GRkbBwcEFBQWvXr2aPn16UVGRs7Pz\nd9N++vTpfROFhYWEEHd398rKyrFjx4aGhhYUFNy5c2f8+PFsNtvDw4MQ0lKnkJmZ2fSz1+YP\nDQDtGpW35AJAuxQbGzto0KBGv4tkZGQ2bNjAW7W4rq5u8+bNDeefNDQ0YmJiuFvPnz/PXZ6X\nu4O2tvaTJ0+4SxDb2dlxmixQ7O/vLy0tzftWoqKi27Ztaz5k0zlFHltbW+4+3t7eDVcJlpGR\nOXv2LO87/OYppKamCgsLE0KEhYULCwsbLVDc/KG5y500XEuFw+GwWKyxY8f+9L8WALQpDM43\nrsMFAGhVcXFxz549KywslJOTU1NTGz58eMeOHRvtk5mZGR0dnZubq6mpOW7cuIbP43r//v39\n+/c/f/6sp6dnaGgoJiaWlJR07949XV3dMWPGXL16NT4+ftOmTdxuRAgpKCh4+vRpSkqKsrLy\nyJEjv3stWkxMTHBw8Fc39e3bd+rUqdyvP3z4wHuu17Bhwxo+3+I3T4EQkpaWxl30bvHixUFB\nQY0eKdbMoW/cuPHy5UsXFxcJCQneoKenZ5cuXWbPnt38iQNAm4ZiBwAAAEATuMYOAAAAgCZQ\n7AAAA
"text/plain": [
"Plot with title “”"
]
},
"metadata": {
"image/png": {
"height": 420,
"width": 420
},
"text/plain": {
"height": 420,
"width": 420
}
},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA0gAAANICAIAAAByhViMAAAACXBIWXMAABJ0AAASdAHeZh94\nAAAgAElEQVR4nOzdeUBN6f8H8Pdtj0pkiWGSlBQlW6WytNj3aGxDRj/LWNPYl7EPYxv7zli+\nmLHLLkKLfatMWkRKKVumtNf9/XFNJVSoc+r2fv3Vec65577vNaOP55zPeSRSqRREREREVPYp\niB2AiIiIiIoHCzsiIiIiOcHCjoiIiEhOsLAjIiIikhMs7IiIiIjkBAs7IiIiIjnBwo6IiIhI\nTrCwIyIiIpITLOyIiIiI5AQLOyIiIiI5wcKOiIiISE6wsCMiIiKSEyzsiIiIiOQECzsiIiIi\nOcHCjoiIiEhOsLAjIiIikhMs7IiIiIjkBAs7IiIiIjnBwo6IiIhITrCwIyIiIpITLOyIiIiI\n5AQLOyIiIiI5wcKOiIiISE6wsCMiIiKSEyzsiIiIiOQECzsiIiIiOcHCjoiIiEhOsLAjIiIi\nkhMs7IiIiIjkBAs7IiIiIjnBwo6IiIhITrCwIyIiIpITLOyIiIiI5AQLOyIiIiI5wcKOiIiI\nSE6wsCMiIiKSEyzsiIiIiOQECzsiIiIiOcHCjoiIiEhOsLAjIiIikhMs7IiIiIjkBAs7IiIi\nIjnBwo6IiIhITrCwIyIiIpITLOyIiIiI5AQLOyIiIiI5wcKOiIiISE6wsCMiIiKSEyzsiIiI\niOQECzsiIiIiOcHCjoiIiEhOsLAjIiIikhMs7IiIiIjkBAs7IiIiIjnBwo6IiIhITrCwIyIi\nIpITLOyIiIiI5AQLOyIiIiI5wcKOiIiISE6wsCMiIiKSEyzsiIiIiOQECzsiIiIiOcHCjoiI\niEhOsLAjIiIikhMs7IiIiIjkBAs7IiIiIjnBwo6IiIhITrCwIyIiIpITLOyIiIiI5AQLOyIi\nIiI5wcKOiIiISE4oiR2AiEqFI0eOBAQE5BusVKmSgYFBu3btNDQ0iuVd4uLiNm7c2LZt2zZt\n2nzygMePH+/atat79+4WFhbf/nZv3rxZvXq1ra2tg4PDt5/tGy1fvjw9PX3atGliByEieSaR\nSqViZyAi8f3444979uz55C5dXd3t27d36tTp29/l/v37TZo0mTNnzq+//vrJAy5cuODo6Lh1\n69Zhw4Z9+9s9evSofv36U6dO/e233779bN+oZs2aSUlJiYmJYgchInnGGTsiynXgwIGcqbLs\n7Oz4+Pjdu3dv2rRp0KBBwcHB1atX/8bzV6lSxc3NrWnTpt+clIiIPoGFHRHlqlOnjoGBQc6m\noaGhjY1NRETE+fPnL1265OLi8u3n37JlyzeehIiIPoeFHREVom3btufPnw8PD887GBQUdOvW\nrTdv3piZmdnb20skkrx7Hz9+7OvrGxsb+9133zk4OOjq6srGX7x4sX79+rz32P3777/+/v7B\nwcEmJiatWrXKe5LY2NjNmze3b9/e2to6Z/DChQu+vr7jxo2rXLmybCQ1NdXf3//hw4dpaWl1\n69bt2LGjurr65z7L54LlExUVtX379kaNGjk7O+cd//PPPyMjI8ePH6+trV30s32RT36xRczz\nuZcDePv27R9//NG1a1cLC4sjR478888/s2bNku0q9AuUHRAQEGBmZtaqVavAwMBTp05NnDhR\nU1Oz4NhEJAIpEZFUOmjQIADXrl37eNf06dMBbNiwQbaZmJg4YMCAvH+NNG7c+NGjRznHz5w5\nU0kp9x+NFSpU2Ldvn2xXUFAQgDlz5sg2/f39v/vuu5wj9fT01qxZA2Dr1q1SqfTWrVsAli1b\nljfM1KlTAYSHh+ecoX79+nnDVK1a9fbt27K9smJ06tSphQbLJyUlRVNTs3bt2nkH3717V6FC\nBSMjoy89m4yurq6GhkYBBxTwxRYlT8F/Lk+ePAGwfv36Pn36ANDV1S3KFyiVSp8+fWpmZpaz\n19zcfNKkSQCio6OL8r5EJDAWdkQklX6+sEtKSqpfv76qquqzZ89kIy4uLhKJZOLEicHBwRER\nEYsWLVJWVjYwMEhNTZVKpefOnQPg6Oh49uzZp0+f7t27V01NrWLFisnJydIPC7sXL15oamoq\nKysvW7Ys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Nj19Y\n9GA5XFxc9uzZc+zYMQ8Pj4MHD6qrq+c0pX7F2QpW6BdbcJ6ivBxAhQoV8u4q9AtMS0v7OKrs\nPsgvel8iEgwLOyIqhIWFxd27d+Pj47W1tWUdlEOHDjUyMso5QCqVJicnywo12WxNixYtWrRo\nAeD169fTp0/ftGnTypUrFy9enPe09erVCwgISE9PzztpFxYWlu/dpR+ujhMdHZ3z819//XXh\nwoWVK1dOmDAhZ/BzD9ooerAcHTp0qFSp0tGjR0ePHn3ixImePXtqaWl99dkKVugXW3Ceorz8\nY4V+gfXr179y5UpMTEzeSTvZVd1veV8iKjkKhR9CROWb7Df027dvAdjY2ACQ3WGWY+bMmRoa\nGp6engA6duyooqKSkJAg21WlShUPDw8Ab968yXfaNm3aJCUlbdu2LWckMzMz7+OLFRUVAcTG\nxuaM/Pvvv+fPn8/ZvHHjBoCePXvmjLx79+7Bgwef/BRFD5ZDRUWlR48e/v7+O3fuTEpKyrnu\n+XVnK1ihX2zBeYry8o8V+gXa2dkB+N///pcz8ujRo2vXrn3j+xJRCRL1Dj8iKi0KeI7dmDFj\nAJw6dUq2aW9vD8Dd3T0oKCg+Pn7Tpk2KioqGhoayx1ssWLAAQJcuXe7cufPixYszZ8507NgR\nwIEDB6QfNk+8fPlSU1NTRUVl1apVT548uXnzZocOHSpWrIj/mieSkpKUlJQqVap06dKlrKys\nkJAQBwcH2V9csuaJpUuXAhg5cmRERERqaurly5ebN28OQEVF5fXr19IPmycKDvY5J06cAFCp\nUiVdX
"text/plain": [
"Plot with title “”"
]
},
"metadata": {
"image/png": {
"height": 420,
"width": 420
},
"text/plain": {
"height": 420,
"width": 420
}
},
"output_type": "display_data"
2020-03-28 01:06:31 +00:00
}
],
"source": [
2020-08-01 22:25:45 +00:00
"model2 = lm(medv~.+lstat:age, data=Boston)\n",
"summary(model2)\n",
"plot(model2)"
2020-03-28 01:06:31 +00:00
]
},
{
"cell_type": "code",
2020-08-01 22:25:45 +00:00
"execution_count": 62,
2020-03-28 01:06:31 +00:00
"metadata": {},
"outputs": [],
2020-08-01 22:25:45 +00:00
"source": [
"model3 = lm(medv ~ lstat + I(lstat^2), data=Boston)\n",
"## or this\n",
"model4 = lm(medv~lstat + poly(lstat,2), data=Boston)"
]
},
{
"cell_type": "code",
"execution_count": 65,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<table>\n",
"<caption>A anova: 4 × 6</caption>\n",
"<thead>\n",
"\t<tr><th></th><th scope=col>Res.Df</th><th scope=col>RSS</th><th scope=col>Df</th><th scope=col>Sum of Sq</th><th scope=col>F</th><th scope=col>Pr(&gt;F)</th></tr>\n",
"\t<tr><th></th><th scope=col>&lt;dbl&gt;</th><th scope=col>&lt;dbl&gt;</th><th scope=col>&lt;dbl&gt;</th><th scope=col>&lt;dbl&gt;</th><th scope=col>&lt;dbl&gt;</th><th scope=col>&lt;dbl&gt;</th></tr>\n",
"</thead>\n",
"<tbody>\n",
"\t<tr><th scope=row>1</th><td>493</td><td>11321.04</td><td> NA</td><td> NA</td><td> NA</td><td> NA</td></tr>\n",
"\t<tr><th scope=row>2</th><td>491</td><td>11064.20</td><td> 2</td><td> 2.568379e+02</td><td> 5.698892</td><td>3.575134e-03</td></tr>\n",
"\t<tr><th scope=row>3</th><td>503</td><td>15347.24</td><td>-12</td><td>-4.283039e+03</td><td>15.839158</td><td>1.824240e-28</td></tr>\n",
"\t<tr><th scope=row>4</th><td>503</td><td>15347.24</td><td> 0</td><td> 1.818989e-12</td><td> NA</td><td> NA</td></tr>\n",
"</tbody>\n",
"</table>\n"
],
"text/latex": [
"A anova: 4 × 6\n",
"\\begin{tabular}{r|llllll}\n",
" & Res.Df & RSS & Df & Sum of Sq & F & Pr(>F)\\\\\n",
" & <dbl> & <dbl> & <dbl> & <dbl> & <dbl> & <dbl>\\\\\n",
"\\hline\n",
"\t1 & 493 & 11321.04 & NA & NA & NA & NA\\\\\n",
"\t2 & 491 & 11064.20 & 2 & 2.568379e+02 & 5.698892 & 3.575134e-03\\\\\n",
"\t3 & 503 & 15347.24 & -12 & -4.283039e+03 & 15.839158 & 1.824240e-28\\\\\n",
"\t4 & 503 & 15347.24 & 0 & 1.818989e-12 & NA & NA\\\\\n",
"\\end{tabular}\n"
],
"text/markdown": [
"\n",
"A anova: 4 × 6\n",
"\n",
"| <!--/--> | Res.Df &lt;dbl&gt; | RSS &lt;dbl&gt; | Df &lt;dbl&gt; | Sum of Sq &lt;dbl&gt; | F &lt;dbl&gt; | Pr(&gt;F) &lt;dbl&gt; |\n",
"|---|---|---|---|---|---|---|\n",
"| 1 | 493 | 11321.04 | NA | NA | NA | NA |\n",
"| 2 | 491 | 11064.20 | 2 | 2.568379e+02 | 5.698892 | 3.575134e-03 |\n",
"| 3 | 503 | 15347.24 | -12 | -4.283039e+03 | 15.839158 | 1.824240e-28 |\n",
"| 4 | 503 | 15347.24 | 0 | 1.818989e-12 | NA | NA |\n",
"\n"
],
"text/plain": [
" Res.Df RSS Df Sum of Sq F Pr(>F) \n",
"1 493 11321.04 NA NA NA NA\n",
"2 491 11064.20 2 2.568379e+02 5.698892 3.575134e-03\n",
"3 503 15347.24 -12 -4.283039e+03 15.839158 1.824240e-28\n",
"4 503 15347.24 0 1.818989e-12 NA NA"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"anova(model, model2, model3, model4)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Categorical data\n",
"lm automagically creates the dummy vars for us if we have categorical data"
]
2020-03-28 01:06:31 +00:00
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "R",
"language": "R",
"name": "ir"
},
"language_info": {
"codemirror_mode": "r",
"file_extension": ".r",
"mimetype": "text/x-r-source",
"name": "R",
"pygments_lexer": "r",
"version": "3.6.3"
}
},
"nbformat": 4,
"nbformat_minor": 4
}