|
12 | 12 | "execution_count": 1,
|
13 | 13 | "metadata": {
|
14 | 14 | "execution": {
|
15 |
| - "iopub.execute_input": "2023-11-17T15:19:47.689147Z", |
16 |
| - "iopub.status.busy": "2023-11-17T15:19:47.688960Z", |
17 |
| - "iopub.status.idle": "2023-11-17T15:19:47.708832Z", |
18 |
| - "shell.execute_reply": "2023-11-17T15:19:47.708327Z" |
| 15 | + "iopub.execute_input": "2023-11-17T17:51:32.542532Z", |
| 16 | + "iopub.status.busy": "2023-11-17T17:51:32.542194Z", |
| 17 | + "iopub.status.idle": "2023-11-17T17:51:32.561080Z", |
| 18 | + "shell.execute_reply": "2023-11-17T17:51:32.560489Z" |
19 | 19 | }
|
20 | 20 | },
|
21 | 21 | "outputs": [],
|
|
29 | 29 | "execution_count": 2,
|
30 | 30 | "metadata": {
|
31 | 31 | "execution": {
|
32 |
| - "iopub.execute_input": "2023-11-17T15:19:47.711469Z", |
33 |
| - "iopub.status.busy": "2023-11-17T15:19:47.711042Z", |
34 |
| - "iopub.status.idle": "2023-11-17T15:19:49.141738Z", |
35 |
| - "shell.execute_reply": "2023-11-17T15:19:49.141072Z" |
| 32 | + "iopub.execute_input": "2023-11-17T17:51:32.563496Z", |
| 33 | + "iopub.status.busy": "2023-11-17T17:51:32.563141Z", |
| 34 | + "iopub.status.idle": "2023-11-17T17:51:33.983084Z", |
| 35 | + "shell.execute_reply": "2023-11-17T17:51:33.982442Z" |
36 | 36 | }
|
37 | 37 | },
|
38 | 38 | "outputs": [],
|
|
60 | 60 | "execution_count": 3,
|
61 | 61 | "metadata": {
|
62 | 62 | "execution": {
|
63 |
| - "iopub.execute_input": "2023-11-17T15:19:49.144755Z", |
64 |
| - "iopub.status.busy": "2023-11-17T15:19:49.144288Z", |
65 |
| - "iopub.status.idle": "2023-11-17T15:19:49.177713Z", |
66 |
| - "shell.execute_reply": "2023-11-17T15:19:49.177004Z" |
| 63 | + "iopub.execute_input": "2023-11-17T17:51:33.986183Z", |
| 64 | + "iopub.status.busy": "2023-11-17T17:51:33.985527Z", |
| 65 | + "iopub.status.idle": "2023-11-17T17:51:34.018650Z", |
| 66 | + "shell.execute_reply": "2023-11-17T17:51:34.018032Z" |
67 | 67 | }
|
68 | 68 | },
|
69 | 69 | "outputs": [],
|
|
115 | 115 | "execution_count": 4,
|
116 | 116 | "metadata": {
|
117 | 117 | "execution": {
|
118 |
| - "iopub.execute_input": "2023-11-17T15:19:49.180518Z", |
119 |
| - "iopub.status.busy": "2023-11-17T15:19:49.180279Z", |
120 |
| - "iopub.status.idle": "2023-11-17T15:19:49.350542Z", |
121 |
| - "shell.execute_reply": "2023-11-17T15:19:49.349964Z" |
| 118 | + "iopub.execute_input": "2023-11-17T17:51:34.021534Z", |
| 119 | + "iopub.status.busy": "2023-11-17T17:51:34.021143Z", |
| 120 | + "iopub.status.idle": "2023-11-17T17:51:34.171030Z", |
| 121 | + "shell.execute_reply": "2023-11-17T17:51:34.170349Z" |
122 | 122 | }
|
123 | 123 | },
|
124 | 124 | "outputs": [
|
|
170 | 170 | "execution_count": 5,
|
171 | 171 | "metadata": {
|
172 | 172 | "execution": {
|
173 |
| - "iopub.execute_input": "2023-11-17T15:19:49.353101Z", |
174 |
| - "iopub.status.busy": "2023-11-17T15:19:49.352891Z", |
175 |
| - "iopub.status.idle": "2023-11-17T15:19:49.603897Z", |
176 |
| - "shell.execute_reply": "2023-11-17T15:19:49.603276Z" |
| 173 | + "iopub.execute_input": "2023-11-17T17:51:34.173624Z", |
| 174 | + "iopub.status.busy": "2023-11-17T17:51:34.173244Z", |
| 175 | + "iopub.status.idle": "2023-11-17T17:51:34.410209Z", |
| 176 | + "shell.execute_reply": "2023-11-17T17:51:34.409518Z" |
177 | 177 | }
|
178 | 178 | },
|
179 | 179 | "outputs": [
|
|
215 | 215 | "execution_count": 6,
|
216 | 216 | "metadata": {
|
217 | 217 | "execution": {
|
218 |
| - "iopub.execute_input": "2023-11-17T15:19:49.606309Z", |
219 |
| - "iopub.status.busy": "2023-11-17T15:19:49.605951Z", |
220 |
| - "iopub.status.idle": "2023-11-17T15:19:52.401841Z", |
221 |
| - "shell.execute_reply": "2023-11-17T15:19:52.401134Z" |
| 218 | + "iopub.execute_input": "2023-11-17T17:51:34.413038Z", |
| 219 | + "iopub.status.busy": "2023-11-17T17:51:34.412663Z", |
| 220 | + "iopub.status.idle": "2023-11-17T17:51:37.173054Z", |
| 221 | + "shell.execute_reply": "2023-11-17T17:51:37.172392Z" |
222 | 222 | }
|
223 | 223 | },
|
224 | 224 | "outputs": [
|
|
256 | 256 | "Target units: ate\n",
|
257 | 257 | "\n",
|
258 | 258 | "## Estimate\n",
|
259 |
| - "Mean value: 3.9641061599285914\n", |
| 259 | + "Mean value: 4.116464918873208\n", |
260 | 260 | "p-value: [0, 0.001]\n",
|
261 | 261 | "\n"
|
262 | 262 | ]
|
|
285 | 285 | "execution_count": 7,
|
286 | 286 | "metadata": {
|
287 | 287 | "execution": {
|
288 |
| - "iopub.execute_input": "2023-11-17T15:19:52.404565Z", |
289 |
| - "iopub.status.busy": "2023-11-17T15:19:52.404002Z", |
290 |
| - "iopub.status.idle": "2023-11-17T15:19:52.807384Z", |
291 |
| - "shell.execute_reply": "2023-11-17T15:19:52.806753Z" |
| 288 | + "iopub.execute_input": "2023-11-17T17:51:37.175622Z", |
| 289 | + "iopub.status.busy": "2023-11-17T17:51:37.175142Z", |
| 290 | + "iopub.status.idle": "2023-11-17T17:51:37.580122Z", |
| 291 | + "shell.execute_reply": "2023-11-17T17:51:37.579468Z" |
292 | 292 | }
|
293 | 293 | },
|
294 | 294 | "outputs": [
|
|
297 | 297 | "output_type": "stream",
|
298 | 298 | "text": [
|
299 | 299 | "Refute: Use a Placebo Treatment\n",
|
300 |
| - "Estimated effect:3.9641061599285914\n", |
301 |
| - "New effect:0.0202658947431454\n", |
302 |
| - "p value:1.0\n", |
| 300 | + "Estimated effect:4.116464918873208\n", |
| 301 | + "New effect:0.02070953332394378\n", |
| 302 | + "p value:0.96\n", |
303 | 303 | "\n"
|
304 | 304 | ]
|
305 | 305 | }
|
|
331 | 331 | "execution_count": 8,
|
332 | 332 | "metadata": {
|
333 | 333 | "execution": {
|
334 |
| - "iopub.execute_input": "2023-11-17T15:19:52.809707Z", |
335 |
| - "iopub.status.busy": "2023-11-17T15:19:52.809497Z", |
336 |
| - "iopub.status.idle": "2023-11-17T15:19:52.863311Z", |
337 |
| - "shell.execute_reply": "2023-11-17T15:19:52.862644Z" |
| 334 | + "iopub.execute_input": "2023-11-17T17:51:37.582820Z", |
| 335 | + "iopub.status.busy": "2023-11-17T17:51:37.582404Z", |
| 336 | + "iopub.status.idle": "2023-11-17T17:51:37.639476Z", |
| 337 | + "shell.execute_reply": "2023-11-17T17:51:37.638811Z" |
338 | 338 | }
|
339 | 339 | },
|
340 | 340 | "outputs": [
|
|
344 | 344 | "<table class=\"simpletable\">\n",
|
345 | 345 | "<caption>IV2SLS Regression Results</caption>\n",
|
346 | 346 | "<tr>\n",
|
347 |
| - " <th>Dep. Variable:</th> <td>income</td> <th> R-squared: </th> <td> 0.887</td> \n", |
| 347 | + " <th>Dep. Variable:</th> <td>income</td> <th> R-squared: </th> <td> 0.903</td> \n", |
348 | 348 | "</tr>\n",
|
349 | 349 | "<tr>\n",
|
350 |
| - " <th>Model:</th> <td>IV2SLS</td> <th> Adj. R-squared: </th> <td> 0.887</td> \n", |
| 350 | + " <th>Model:</th> <td>IV2SLS</td> <th> Adj. R-squared: </th> <td> 0.903</td> \n", |
351 | 351 | "</tr>\n",
|
352 | 352 | "<tr>\n",
|
353 |
| - " <th>Method:</th> <td>Two Stage</td> <th> F-statistic: </th> <td> 1229.</td> \n", |
| 353 | + " <th>Method:</th> <td>Two Stage</td> <th> F-statistic: </th> <td> 1893.</td> \n", |
354 | 354 | "</tr>\n",
|
355 | 355 | "<tr>\n",
|
356 |
| - " <th></th> <td>Least Squares</td> <th> Prob (F-statistic):</th> <td>3.70e-176</td>\n", |
| 356 | + " <th></th> <td>Least Squares</td> <th> Prob (F-statistic):</th> <td>1.03e-232</td>\n", |
357 | 357 | "</tr>\n",
|
358 | 358 | "<tr>\n",
|
359 | 359 | " <th>Date:</th> <td>Fri, 17 Nov 2023</td> <th> </th> <td> </td> \n",
|
360 | 360 | "</tr>\n",
|
361 | 361 | "<tr>\n",
|
362 |
| - " <th>Time:</th> <td>15:19:52</td> <th> </th> <td> </td> \n", |
| 362 | + " <th>Time:</th> <td>17:51:37</td> <th> </th> <td> </td> \n", |
363 | 363 | "</tr>\n",
|
364 | 364 | "<tr>\n",
|
365 | 365 | " <th>No. Observations:</th> <td> 1000</td> <th> </th> <td> </td> \n",
|
|
376 | 376 | " <td></td> <th>coef</th> <th>std err</th> <th>t</th> <th>P>|t|</th> <th>[0.025</th> <th>0.975]</th> \n",
|
377 | 377 | "</tr>\n",
|
378 | 378 | "<tr>\n",
|
379 |
| - " <th>Intercept</th> <td> 10.2967</td> <td> 1.024</td> <td> 10.060</td> <td> 0.000</td> <td> 8.288</td> <td> 12.305</td>\n", |
| 379 | + " <th>Intercept</th> <td> 8.9716</td> <td> 0.873</td> <td> 10.272</td> <td> 0.000</td> <td> 7.258</td> <td> 10.685</td>\n", |
380 | 380 | "</tr>\n",
|
381 | 381 | "<tr>\n",
|
382 |
| - " <th>education</th> <td> 3.9641</td> <td> 0.113</td> <td> 35.059</td> <td> 0.000</td> <td> 3.742</td> <td> 4.186</td>\n", |
| 382 | + " <th>education</th> <td> 4.1165</td> <td> 0.095</td> <td> 43.506</td> <td> 0.000</td> <td> 3.931</td> <td> 4.302</td>\n", |
383 | 383 | "</tr>\n",
|
384 | 384 | "</table>\n",
|
385 | 385 | "<table class=\"simpletable\">\n",
|
386 | 386 | "<tr>\n",
|
387 |
| - " <th>Omnibus:</th> <td> 2.166</td> <th> Durbin-Watson: </th> <td> 1.969</td>\n", |
| 387 | + " <th>Omnibus:</th> <td> 7.452</td> <th> Durbin-Watson: </th> <td> 2.054</td>\n", |
388 | 388 | "</tr>\n",
|
389 | 389 | "<tr>\n",
|
390 |
| - " <th>Prob(Omnibus):</th> <td> 0.339</td> <th> Jarque-Bera (JB): </th> <td> 2.172</td>\n", |
| 390 | + " <th>Prob(Omnibus):</th> <td> 0.024</td> <th> Jarque-Bera (JB): </th> <td> 5.393</td>\n", |
391 | 391 | "</tr>\n",
|
392 | 392 | "<tr>\n",
|
393 |
| - " <th>Skew:</th> <td> 0.038</td> <th> Prob(JB): </th> <td> 0.338</td>\n", |
| 393 | + " <th>Skew:</th> <td> 0.031</td> <th> Prob(JB): </th> <td> 0.0674</td>\n", |
394 | 394 | "</tr>\n",
|
395 | 395 | "<tr>\n",
|
396 |
| - " <th>Kurtosis:</th> <td> 3.215</td> <th> Cond. No. </th> <td> 25.3</td>\n", |
| 396 | + " <th>Kurtosis:</th> <td> 2.646</td> <th> Cond. No. </th> <td> 25.3</td>\n", |
397 | 397 | "</tr>\n",
|
398 | 398 | "</table>"
|
399 | 399 | ],
|
400 | 400 | "text/latex": [
|
401 | 401 | "\\begin{center}\n",
|
402 | 402 | "\\begin{tabular}{lclc}\n",
|
403 | 403 | "\\toprule\n",
|
404 |
| - "\\textbf{Dep. Variable:} & income & \\textbf{ R-squared: } & 0.887 \\\\\n", |
405 |
| - "\\textbf{Model:} & IV2SLS & \\textbf{ Adj. R-squared: } & 0.887 \\\\\n", |
406 |
| - "\\textbf{Method:} & Two Stage & \\textbf{ F-statistic: } & 1229. \\\\\n", |
407 |
| - "\\textbf{} & Least Squares & \\textbf{ Prob (F-statistic):} & 3.70e-176 \\\\\n", |
| 404 | + "\\textbf{Dep. Variable:} & income & \\textbf{ R-squared: } & 0.903 \\\\\n", |
| 405 | + "\\textbf{Model:} & IV2SLS & \\textbf{ Adj. R-squared: } & 0.903 \\\\\n", |
| 406 | + "\\textbf{Method:} & Two Stage & \\textbf{ F-statistic: } & 1893. \\\\\n", |
| 407 | + "\\textbf{} & Least Squares & \\textbf{ Prob (F-statistic):} & 1.03e-232 \\\\\n", |
408 | 408 | "\\textbf{Date:} & Fri, 17 Nov 2023 & \\textbf{ } & \\\\\n",
|
409 |
| - "\\textbf{Time:} & 15:19:52 & \\textbf{ } & \\\\\n", |
| 409 | + "\\textbf{Time:} & 17:51:37 & \\textbf{ } & \\\\\n", |
410 | 410 | "\\textbf{No. Observations:} & 1000 & \\textbf{ } & \\\\\n",
|
411 | 411 | "\\textbf{Df Residuals:} & 998 & \\textbf{ } & \\\\\n",
|
412 | 412 | "\\textbf{Df Model:} & 1 & \\textbf{ } & \\\\\n",
|
|
415 | 415 | "\\begin{tabular}{lcccccc}\n",
|
416 | 416 | " & \\textbf{coef} & \\textbf{std err} & \\textbf{t} & \\textbf{P$> |$t$|$} & \\textbf{[0.025} & \\textbf{0.975]} \\\\\n",
|
417 | 417 | "\\midrule\n",
|
418 |
| - "\\textbf{Intercept} & 10.2967 & 1.024 & 10.060 & 0.000 & 8.288 & 12.305 \\\\\n", |
419 |
| - "\\textbf{education} & 3.9641 & 0.113 & 35.059 & 0.000 & 3.742 & 4.186 \\\\\n", |
| 418 | + "\\textbf{Intercept} & 8.9716 & 0.873 & 10.272 & 0.000 & 7.258 & 10.685 \\\\\n", |
| 419 | + "\\textbf{education} & 4.1165 & 0.095 & 43.506 & 0.000 & 3.931 & 4.302 \\\\\n", |
420 | 420 | "\\bottomrule\n",
|
421 | 421 | "\\end{tabular}\n",
|
422 | 422 | "\\begin{tabular}{lclc}\n",
|
423 |
| - "\\textbf{Omnibus:} & 2.166 & \\textbf{ Durbin-Watson: } & 1.969 \\\\\n", |
424 |
| - "\\textbf{Prob(Omnibus):} & 0.339 & \\textbf{ Jarque-Bera (JB): } & 2.172 \\\\\n", |
425 |
| - "\\textbf{Skew:} & 0.038 & \\textbf{ Prob(JB): } & 0.338 \\\\\n", |
426 |
| - "\\textbf{Kurtosis:} & 3.215 & \\textbf{ Cond. No. } & 25.3 \\\\\n", |
| 423 | + "\\textbf{Omnibus:} & 7.452 & \\textbf{ Durbin-Watson: } & 2.054 \\\\\n", |
| 424 | + "\\textbf{Prob(Omnibus):} & 0.024 & \\textbf{ Jarque-Bera (JB): } & 5.393 \\\\\n", |
| 425 | + "\\textbf{Skew:} & 0.031 & \\textbf{ Prob(JB): } & 0.0674 \\\\\n", |
| 426 | + "\\textbf{Kurtosis:} & 2.646 & \\textbf{ Cond. No. } & 25.3 \\\\\n", |
427 | 427 | "\\bottomrule\n",
|
428 | 428 | "\\end{tabular}\n",
|
429 | 429 | "%\\caption{IV2SLS Regression Results}\n",
|
|
434 | 434 | "\"\"\"\n",
|
435 | 435 | " IV2SLS Regression Results \n",
|
436 | 436 | "==============================================================================\n",
|
437 |
| - "Dep. Variable: income R-squared: 0.887\n", |
438 |
| - "Model: IV2SLS Adj. R-squared: 0.887\n", |
439 |
| - "Method: Two Stage F-statistic: 1229.\n", |
440 |
| - " Least Squares Prob (F-statistic): 3.70e-176\n", |
| 437 | + "Dep. Variable: income R-squared: 0.903\n", |
| 438 | + "Model: IV2SLS Adj. R-squared: 0.903\n", |
| 439 | + "Method: Two Stage F-statistic: 1893.\n", |
| 440 | + " Least Squares Prob (F-statistic): 1.03e-232\n", |
441 | 441 | "Date: Fri, 17 Nov 2023 \n",
|
442 |
| - "Time: 15:19:52 \n", |
| 442 | + "Time: 17:51:37 \n", |
443 | 443 | "No. Observations: 1000 \n",
|
444 | 444 | "Df Residuals: 998 \n",
|
445 | 445 | "Df Model: 1 \n",
|
446 | 446 | "==============================================================================\n",
|
447 | 447 | " coef std err t P>|t| [0.025 0.975]\n",
|
448 | 448 | "------------------------------------------------------------------------------\n",
|
449 |
| - "Intercept 10.2967 1.024 10.060 0.000 8.288 12.305\n", |
450 |
| - "education 3.9641 0.113 35.059 0.000 3.742 4.186\n", |
| 449 | + "Intercept 8.9716 0.873 10.272 0.000 7.258 10.685\n", |
| 450 | + "education 4.1165 0.095 43.506 0.000 3.931 4.302\n", |
451 | 451 | "==============================================================================\n",
|
452 |
| - "Omnibus: 2.166 Durbin-Watson: 1.969\n", |
453 |
| - "Prob(Omnibus): 0.339 Jarque-Bera (JB): 2.172\n", |
454 |
| - "Skew: 0.038 Prob(JB): 0.338\n", |
455 |
| - "Kurtosis: 3.215 Cond. No. 25.3\n", |
| 452 | + "Omnibus: 7.452 Durbin-Watson: 2.054\n", |
| 453 | + "Prob(Omnibus): 0.024 Jarque-Bera (JB): 5.393\n", |
| 454 | + "Skew: 0.031 Prob(JB): 0.0674\n", |
| 455 | + "Kurtosis: 2.646 Cond. No. 25.3\n", |
456 | 456 | "==============================================================================\n",
|
457 | 457 | "\"\"\""
|
458 | 458 | ]
|
|
0 commit comments