|
12 | 12 | "execution_count": 1,
|
13 | 13 | "metadata": {
|
14 | 14 | "execution": {
|
15 |
| - "iopub.execute_input": "2023-09-04T06:02:02.924727Z", |
16 |
| - "iopub.status.busy": "2023-09-04T06:02:02.919027Z", |
17 |
| - "iopub.status.idle": "2023-09-04T06:02:02.949261Z", |
18 |
| - "shell.execute_reply": "2023-09-04T06:02:02.948415Z" |
| 15 | + "iopub.execute_input": "2023-09-27T18:44:46.888534Z", |
| 16 | + "iopub.status.busy": "2023-09-27T18:44:46.888021Z", |
| 17 | + "iopub.status.idle": "2023-09-27T18:44:46.916006Z", |
| 18 | + "shell.execute_reply": "2023-09-27T18:44:46.914905Z" |
19 | 19 | }
|
20 | 20 | },
|
21 | 21 | "outputs": [],
|
|
29 | 29 | "execution_count": 2,
|
30 | 30 | "metadata": {
|
31 | 31 | "execution": {
|
32 |
| - "iopub.execute_input": "2023-09-04T06:02:02.953668Z", |
33 |
| - "iopub.status.busy": "2023-09-04T06:02:02.953149Z", |
34 |
| - "iopub.status.idle": "2023-09-04T06:02:04.993740Z", |
35 |
| - "shell.execute_reply": "2023-09-04T06:02:04.992662Z" |
| 32 | + "iopub.execute_input": "2023-09-27T18:44:46.920682Z", |
| 33 | + "iopub.status.busy": "2023-09-27T18:44:46.920374Z", |
| 34 | + "iopub.status.idle": "2023-09-27T18:44:49.308064Z", |
| 35 | + "shell.execute_reply": "2023-09-27T18:44:49.306935Z" |
36 | 36 | }
|
37 | 37 | },
|
38 | 38 | "outputs": [],
|
|
60 | 60 | "execution_count": 3,
|
61 | 61 | "metadata": {
|
62 | 62 | "execution": {
|
63 |
| - "iopub.execute_input": "2023-09-04T06:02:04.999215Z", |
64 |
| - "iopub.status.busy": "2023-09-04T06:02:04.998161Z", |
65 |
| - "iopub.status.idle": "2023-09-04T06:02:05.037953Z", |
66 |
| - "shell.execute_reply": "2023-09-04T06:02:05.037174Z" |
| 63 | + "iopub.execute_input": "2023-09-27T18:44:49.313302Z", |
| 64 | + "iopub.status.busy": "2023-09-27T18:44:49.312189Z", |
| 65 | + "iopub.status.idle": "2023-09-27T18:44:49.356510Z", |
| 66 | + "shell.execute_reply": "2023-09-27T18:44:49.355454Z" |
67 | 67 | }
|
68 | 68 | },
|
69 | 69 | "outputs": [],
|
|
115 | 115 | "execution_count": 4,
|
116 | 116 | "metadata": {
|
117 | 117 | "execution": {
|
118 |
| - "iopub.execute_input": "2023-09-04T06:02:05.042878Z", |
119 |
| - "iopub.status.busy": "2023-09-04T06:02:05.042567Z", |
120 |
| - "iopub.status.idle": "2023-09-04T06:02:05.270771Z", |
121 |
| - "shell.execute_reply": "2023-09-04T06:02:05.269917Z" |
| 118 | + "iopub.execute_input": "2023-09-27T18:44:49.360967Z", |
| 119 | + "iopub.status.busy": "2023-09-27T18:44:49.360683Z", |
| 120 | + "iopub.status.idle": "2023-09-27T18:44:49.632019Z", |
| 121 | + "shell.execute_reply": "2023-09-27T18:44:49.629216Z" |
122 | 122 | }
|
123 | 123 | },
|
124 | 124 | "outputs": [
|
|
170 | 170 | "execution_count": 5,
|
171 | 171 | "metadata": {
|
172 | 172 | "execution": {
|
173 |
| - "iopub.execute_input": "2023-09-04T06:02:05.274686Z", |
174 |
| - "iopub.status.busy": "2023-09-04T06:02:05.274393Z", |
175 |
| - "iopub.status.idle": "2023-09-04T06:02:05.670254Z", |
176 |
| - "shell.execute_reply": "2023-09-04T06:02:05.669427Z" |
| 173 | + "iopub.execute_input": "2023-09-27T18:44:49.647072Z", |
| 174 | + "iopub.status.busy": "2023-09-27T18:44:49.645408Z", |
| 175 | + "iopub.status.idle": "2023-09-27T18:44:50.124359Z", |
| 176 | + "shell.execute_reply": "2023-09-27T18:44:50.123364Z" |
177 | 177 | }
|
178 | 178 | },
|
179 | 179 | "outputs": [
|
|
215 | 215 | "execution_count": 6,
|
216 | 216 | "metadata": {
|
217 | 217 | "execution": {
|
218 |
| - "iopub.execute_input": "2023-09-04T06:02:05.674396Z", |
219 |
| - "iopub.status.busy": "2023-09-04T06:02:05.673801Z", |
220 |
| - "iopub.status.idle": "2023-09-04T06:02:10.038876Z", |
221 |
| - "shell.execute_reply": "2023-09-04T06:02:10.037886Z" |
| 218 | + "iopub.execute_input": "2023-09-27T18:44:50.128540Z", |
| 219 | + "iopub.status.busy": "2023-09-27T18:44:50.128234Z", |
| 220 | + "iopub.status.idle": "2023-09-27T18:44:55.621028Z", |
| 221 | + "shell.execute_reply": "2023-09-27T18:44:55.620039Z" |
222 | 222 | }
|
223 | 223 | },
|
224 | 224 | "outputs": [
|
|
256 | 256 | "Target units: ate\n",
|
257 | 257 | "\n",
|
258 | 258 | "## Estimate\n",
|
259 |
| - "Mean value: 3.9299885496595737\n", |
| 259 | + "Mean value: 3.8636544758563276\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-09-04T06:02:10.043344Z", |
289 |
| - "iopub.status.busy": "2023-09-04T06:02:10.042916Z", |
290 |
| - "iopub.status.idle": "2023-09-04T06:02:10.662726Z", |
291 |
| - "shell.execute_reply": "2023-09-04T06:02:10.661557Z" |
| 288 | + "iopub.execute_input": "2023-09-27T18:44:55.625233Z", |
| 289 | + "iopub.status.busy": "2023-09-27T18:44:55.624530Z", |
| 290 | + "iopub.status.idle": "2023-09-27T18:44:56.437200Z", |
| 291 | + "shell.execute_reply": "2023-09-27T18:44:56.436060Z" |
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.9299885496595737\n", |
301 |
| - "New effect:0.0013675060219722095\n", |
302 |
| - "p value:0.98\n", |
| 300 | + "Estimated effect:3.8636544758563276\n", |
| 301 | + "New effect:-0.021007457535599135\n", |
| 302 | + "p value:0.8799999999999999\n", |
303 | 303 | "\n"
|
304 | 304 | ]
|
305 | 305 | }
|
|
331 | 331 | "execution_count": 8,
|
332 | 332 | "metadata": {
|
333 | 333 | "execution": {
|
334 |
| - "iopub.execute_input": "2023-09-04T06:02:10.667021Z", |
335 |
| - "iopub.status.busy": "2023-09-04T06:02:10.666451Z", |
336 |
| - "iopub.status.idle": "2023-09-04T06:02:10.740290Z", |
337 |
| - "shell.execute_reply": "2023-09-04T06:02:10.739532Z" |
| 334 | + "iopub.execute_input": "2023-09-27T18:44:56.442303Z", |
| 335 | + "iopub.status.busy": "2023-09-27T18:44:56.441740Z", |
| 336 | + "iopub.status.idle": "2023-09-27T18:44:56.531635Z", |
| 337 | + "shell.execute_reply": "2023-09-27T18:44:56.530481Z" |
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.886</td> \n", |
| 347 | + " <th>Dep. Variable:</th> <td>income</td> <th> R-squared: </th> <td> 0.875</td> \n", |
348 | 348 | "</tr>\n",
|
349 | 349 | "<tr>\n",
|
350 |
| - " <th>Model:</th> <td>IV2SLS</td> <th> Adj. R-squared: </th> <td> 0.886</td> \n", |
| 350 | + " <th>Model:</th> <td>IV2SLS</td> <th> Adj. R-squared: </th> <td> 0.875</td> \n", |
351 | 351 | "</tr>\n",
|
352 | 352 | "<tr>\n",
|
353 |
| - " <th>Method:</th> <td>Two Stage</td> <th> F-statistic: </th> <td> 1230.</td> \n", |
| 353 | + " <th>Method:</th> <td>Two Stage</td> <th> F-statistic: </th> <td> 1117.</td> \n", |
354 | 354 | "</tr>\n",
|
355 | 355 | "<tr>\n",
|
356 |
| - " <th></th> <td>Least Squares</td> <th> Prob (F-statistic):</th> <td>3.26e-176</td>\n", |
| 356 | + " <th></th> <td>Least Squares</td> <th> Prob (F-statistic):</th> <td>5.48e-165</td>\n", |
357 | 357 | "</tr>\n",
|
358 | 358 | "<tr>\n",
|
359 |
| - " <th>Date:</th> <td>Mon, 04 Sep 2023</td> <th> </th> <td> </td> \n", |
| 359 | + " <th>Date:</th> <td>Wed, 27 Sep 2023</td> <th> </th> <td> </td> \n", |
360 | 360 | "</tr>\n",
|
361 | 361 | "<tr>\n",
|
362 |
| - " <th>Time:</th> <td>06:02:10</td> <th> </th> <td> </td> \n", |
| 362 | + " <th>Time:</th> <td>18:44:56</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> 11.0448</td> <td> 1.065</td> <td> 10.375</td> <td> 0.000</td> <td> 8.956</td> <td> 13.134</td>\n", |
| 379 | + " <th>Intercept</th> <td> 11.1712</td> <td> 1.062</td> <td> 10.523</td> <td> 0.000</td> <td> 9.088</td> <td> 13.254</td>\n", |
380 | 380 | "</tr>\n",
|
381 | 381 | "<tr>\n",
|
382 |
| - " <th>education</th> <td> 3.9300</td> <td> 0.112</td> <td> 35.068</td> <td> 0.000</td> <td> 3.710</td> <td> 4.150</td>\n", |
| 382 | + " <th>education</th> <td> 3.8637</td> <td> 0.116</td> <td> 33.427</td> <td> 0.000</td> <td> 3.637</td> <td> 4.090</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> 1.457</td> <th> Durbin-Watson: </th> <td> 1.992</td>\n", |
| 387 | + " <th>Omnibus:</th> <td> 2.041</td> <th> Durbin-Watson: </th> <td> 1.948</td>\n", |
388 | 388 | "</tr>\n",
|
389 | 389 | "<tr>\n",
|
390 |
| - " <th>Prob(Omnibus):</th> <td> 0.483</td> <th> Jarque-Bera (JB): </th> <td> 1.320</td>\n", |
| 390 | + " <th>Prob(Omnibus):</th> <td> 0.360</td> <th> Jarque-Bera (JB): </th> <td> 1.942</td>\n", |
391 | 391 | "</tr>\n",
|
392 | 392 | "<tr>\n",
|
393 |
| - " <th>Skew:</th> <td> 0.071</td> <th> Prob(JB): </th> <td> 0.517</td>\n", |
| 393 | + " <th>Skew:</th> <td> 0.045</td> <th> Prob(JB): </th> <td> 0.379</td>\n", |
394 | 394 | "</tr>\n",
|
395 | 395 | "<tr>\n",
|
396 |
| - " <th>Kurtosis:</th> <td> 3.107</td> <th> Cond. No. </th> <td> 26.9</td>\n", |
| 396 | + " <th>Kurtosis:</th> <td> 2.804</td> <th> Cond. No. </th> <td> 25.5</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.886 \\\\\n", |
405 |
| - "\\textbf{Model:} & IV2SLS & \\textbf{ Adj. R-squared: } & 0.886 \\\\\n", |
406 |
| - "\\textbf{Method:} & Two Stage & \\textbf{ F-statistic: } & 1230. \\\\\n", |
407 |
| - "\\textbf{} & Least Squares & \\textbf{ Prob (F-statistic):} & 3.26e-176 \\\\\n", |
408 |
| - "\\textbf{Date:} & Mon, 04 Sep 2023 & \\textbf{ } & \\\\\n", |
409 |
| - "\\textbf{Time:} & 06:02:10 & \\textbf{ } & \\\\\n", |
| 404 | + "\\textbf{Dep. Variable:} & income & \\textbf{ R-squared: } & 0.875 \\\\\n", |
| 405 | + "\\textbf{Model:} & IV2SLS & \\textbf{ Adj. R-squared: } & 0.875 \\\\\n", |
| 406 | + "\\textbf{Method:} & Two Stage & \\textbf{ F-statistic: } & 1117. \\\\\n", |
| 407 | + "\\textbf{} & Least Squares & \\textbf{ Prob (F-statistic):} & 5.48e-165 \\\\\n", |
| 408 | + "\\textbf{Date:} & Wed, 27 Sep 2023 & \\textbf{ } & \\\\\n", |
| 409 | + "\\textbf{Time:} & 18:44:56 & \\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} & 11.0448 & 1.065 & 10.375 & 0.000 & 8.956 & 13.134 \\\\\n", |
419 |
| - "\\textbf{education} & 3.9300 & 0.112 & 35.068 & 0.000 & 3.710 & 4.150 \\\\\n", |
| 418 | + "\\textbf{Intercept} & 11.1712 & 1.062 & 10.523 & 0.000 & 9.088 & 13.254 \\\\\n", |
| 419 | + "\\textbf{education} & 3.8637 & 0.116 & 33.427 & 0.000 & 3.637 & 4.090 \\\\\n", |
420 | 420 | "\\bottomrule\n",
|
421 | 421 | "\\end{tabular}\n",
|
422 | 422 | "\\begin{tabular}{lclc}\n",
|
423 |
| - "\\textbf{Omnibus:} & 1.457 & \\textbf{ Durbin-Watson: } & 1.992 \\\\\n", |
424 |
| - "\\textbf{Prob(Omnibus):} & 0.483 & \\textbf{ Jarque-Bera (JB): } & 1.320 \\\\\n", |
425 |
| - "\\textbf{Skew:} & 0.071 & \\textbf{ Prob(JB): } & 0.517 \\\\\n", |
426 |
| - "\\textbf{Kurtosis:} & 3.107 & \\textbf{ Cond. No. } & 26.9 \\\\\n", |
| 423 | + "\\textbf{Omnibus:} & 2.041 & \\textbf{ Durbin-Watson: } & 1.948 \\\\\n", |
| 424 | + "\\textbf{Prob(Omnibus):} & 0.360 & \\textbf{ Jarque-Bera (JB): } & 1.942 \\\\\n", |
| 425 | + "\\textbf{Skew:} & 0.045 & \\textbf{ Prob(JB): } & 0.379 \\\\\n", |
| 426 | + "\\textbf{Kurtosis:} & 2.804 & \\textbf{ Cond. No. } & 25.5 \\\\\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.886\n", |
438 |
| - "Model: IV2SLS Adj. R-squared: 0.886\n", |
439 |
| - "Method: Two Stage F-statistic: 1230.\n", |
440 |
| - " Least Squares Prob (F-statistic): 3.26e-176\n", |
441 |
| - "Date: Mon, 04 Sep 2023 \n", |
442 |
| - "Time: 06:02:10 \n", |
| 437 | + "Dep. Variable: income R-squared: 0.875\n", |
| 438 | + "Model: IV2SLS Adj. R-squared: 0.875\n", |
| 439 | + "Method: Two Stage F-statistic: 1117.\n", |
| 440 | + " Least Squares Prob (F-statistic): 5.48e-165\n", |
| 441 | + "Date: Wed, 27 Sep 2023 \n", |
| 442 | + "Time: 18:44:56 \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 11.0448 1.065 10.375 0.000 8.956 13.134\n", |
450 |
| - "education 3.9300 0.112 35.068 0.000 3.710 4.150\n", |
| 449 | + "Intercept 11.1712 1.062 10.523 0.000 9.088 13.254\n", |
| 450 | + "education 3.8637 0.116 33.427 0.000 3.637 4.090\n", |
451 | 451 | "==============================================================================\n",
|
452 |
| - "Omnibus: 1.457 Durbin-Watson: 1.992\n", |
453 |
| - "Prob(Omnibus): 0.483 Jarque-Bera (JB): 1.320\n", |
454 |
| - "Skew: 0.071 Prob(JB): 0.517\n", |
455 |
| - "Kurtosis: 3.107 Cond. No. 26.9\n", |
| 452 | + "Omnibus: 2.041 Durbin-Watson: 1.948\n", |
| 453 | + "Prob(Omnibus): 0.360 Jarque-Bera (JB): 1.942\n", |
| 454 | + "Skew: 0.045 Prob(JB): 0.379\n", |
| 455 | + "Kurtosis: 2.804 Cond. No. 25.5\n", |
456 | 456 | "==============================================================================\n",
|
457 | 457 | "\"\"\""
|
458 | 458 | ]
|
|
0 commit comments