|
12 | 12 | "execution_count": 1,
|
13 | 13 | "metadata": {
|
14 | 14 | "execution": {
|
15 |
| - "iopub.execute_input": "2023-11-02T19:08:38.592360Z", |
16 |
| - "iopub.status.busy": "2023-11-02T19:08:38.591887Z", |
17 |
| - "iopub.status.idle": "2023-11-02T19:08:38.613360Z", |
18 |
| - "shell.execute_reply": "2023-11-02T19:08:38.612756Z" |
| 15 | + "iopub.execute_input": "2023-11-02T20:14:24.457558Z", |
| 16 | + "iopub.status.busy": "2023-11-02T20:14:24.457298Z", |
| 17 | + "iopub.status.idle": "2023-11-02T20:14:24.483338Z", |
| 18 | + "shell.execute_reply": "2023-11-02T20:14:24.482132Z" |
19 | 19 | }
|
20 | 20 | },
|
21 | 21 | "outputs": [],
|
|
29 | 29 | "execution_count": 2,
|
30 | 30 | "metadata": {
|
31 | 31 | "execution": {
|
32 |
| - "iopub.execute_input": "2023-11-02T19:08:38.616551Z", |
33 |
| - "iopub.status.busy": "2023-11-02T19:08:38.616135Z", |
34 |
| - "iopub.status.idle": "2023-11-02T19:08:40.373887Z", |
35 |
| - "shell.execute_reply": "2023-11-02T19:08:40.373114Z" |
| 32 | + "iopub.execute_input": "2023-11-02T20:14:24.488081Z", |
| 33 | + "iopub.status.busy": "2023-11-02T20:14:24.487109Z", |
| 34 | + "iopub.status.idle": "2023-11-02T20:14:26.256221Z", |
| 35 | + "shell.execute_reply": "2023-11-02T20:14:26.255112Z" |
36 | 36 | }
|
37 | 37 | },
|
38 | 38 | "outputs": [],
|
|
60 | 60 | "execution_count": 3,
|
61 | 61 | "metadata": {
|
62 | 62 | "execution": {
|
63 |
| - "iopub.execute_input": "2023-11-02T19:08:40.378159Z", |
64 |
| - "iopub.status.busy": "2023-11-02T19:08:40.377193Z", |
65 |
| - "iopub.status.idle": "2023-11-02T19:08:40.411216Z", |
66 |
| - "shell.execute_reply": "2023-11-02T19:08:40.410476Z" |
| 63 | + "iopub.execute_input": "2023-11-02T20:14:26.260368Z", |
| 64 | + "iopub.status.busy": "2023-11-02T20:14:26.259474Z", |
| 65 | + "iopub.status.idle": "2023-11-02T20:14:26.293831Z", |
| 66 | + "shell.execute_reply": "2023-11-02T20:14:26.292817Z" |
67 | 67 | }
|
68 | 68 | },
|
69 | 69 | "outputs": [],
|
|
115 | 115 | "execution_count": 4,
|
116 | 116 | "metadata": {
|
117 | 117 | "execution": {
|
118 |
| - "iopub.execute_input": "2023-11-02T19:08:40.414795Z", |
119 |
| - "iopub.status.busy": "2023-11-02T19:08:40.414558Z", |
120 |
| - "iopub.status.idle": "2023-11-02T19:08:40.608745Z", |
121 |
| - "shell.execute_reply": "2023-11-02T19:08:40.608147Z" |
| 118 | + "iopub.execute_input": "2023-11-02T20:14:26.297231Z", |
| 119 | + "iopub.status.busy": "2023-11-02T20:14:26.296790Z", |
| 120 | + "iopub.status.idle": "2023-11-02T20:14:26.484900Z", |
| 121 | + "shell.execute_reply": "2023-11-02T20:14:26.484297Z" |
122 | 122 | }
|
123 | 123 | },
|
124 | 124 | "outputs": [
|
|
170 | 170 | "execution_count": 5,
|
171 | 171 | "metadata": {
|
172 | 172 | "execution": {
|
173 |
| - "iopub.execute_input": "2023-11-02T19:08:40.612308Z", |
174 |
| - "iopub.status.busy": "2023-11-02T19:08:40.611933Z", |
175 |
| - "iopub.status.idle": "2023-11-02T19:08:40.942820Z", |
176 |
| - "shell.execute_reply": "2023-11-02T19:08:40.941974Z" |
| 173 | + "iopub.execute_input": "2023-11-02T20:14:26.487717Z", |
| 174 | + "iopub.status.busy": "2023-11-02T20:14:26.487405Z", |
| 175 | + "iopub.status.idle": "2023-11-02T20:14:26.808761Z", |
| 176 | + "shell.execute_reply": "2023-11-02T20:14:26.807861Z" |
177 | 177 | }
|
178 | 178 | },
|
179 | 179 | "outputs": [
|
|
215 | 215 | "execution_count": 6,
|
216 | 216 | "metadata": {
|
217 | 217 | "execution": {
|
218 |
| - "iopub.execute_input": "2023-11-02T19:08:40.947166Z", |
219 |
| - "iopub.status.busy": "2023-11-02T19:08:40.945787Z", |
220 |
| - "iopub.status.idle": "2023-11-02T19:08:44.632899Z", |
221 |
| - "shell.execute_reply": "2023-11-02T19:08:44.632059Z" |
| 218 | + "iopub.execute_input": "2023-11-02T20:14:26.812415Z", |
| 219 | + "iopub.status.busy": "2023-11-02T20:14:26.811832Z", |
| 220 | + "iopub.status.idle": "2023-11-02T20:14:30.529953Z", |
| 221 | + "shell.execute_reply": "2023-11-02T20:14:30.529167Z" |
222 | 222 | }
|
223 | 223 | },
|
224 | 224 | "outputs": [
|
|
256 | 256 | "Target units: ate\n",
|
257 | 257 | "\n",
|
258 | 258 | "## Estimate\n",
|
259 |
| - "Mean value: 3.9275358858616265\n", |
| 259 | + "Mean value: 3.9636456364965076\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-02T19:08:44.636561Z", |
289 |
| - "iopub.status.busy": "2023-11-02T19:08:44.635921Z", |
290 |
| - "iopub.status.idle": "2023-11-02T19:08:45.184477Z", |
291 |
| - "shell.execute_reply": "2023-11-02T19:08:45.183707Z" |
| 288 | + "iopub.execute_input": "2023-11-02T20:14:30.533822Z", |
| 289 | + "iopub.status.busy": "2023-11-02T20:14:30.533140Z", |
| 290 | + "iopub.status.idle": "2023-11-02T20:14:31.068812Z", |
| 291 | + "shell.execute_reply": "2023-11-02T20:14:31.067951Z" |
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.9275358858616265\n", |
301 |
| - "New effect:-0.00803238006412763\n", |
302 |
| - "p value:0.94\n", |
| 300 | + "Estimated effect:3.9636456364965076\n", |
| 301 | + "New effect:-0.011077238328923891\n", |
| 302 | + "p value:1.0\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-02T19:08:45.188020Z", |
335 |
| - "iopub.status.busy": "2023-11-02T19:08:45.187432Z", |
336 |
| - "iopub.status.idle": "2023-11-02T19:08:45.251295Z", |
337 |
| - "shell.execute_reply": "2023-11-02T19:08:45.250576Z" |
| 334 | + "iopub.execute_input": "2023-11-02T20:14:31.072869Z", |
| 335 | + "iopub.status.busy": "2023-11-02T20:14:31.071896Z", |
| 336 | + "iopub.status.idle": "2023-11-02T20:14:31.134039Z", |
| 337 | + "shell.execute_reply": "2023-11-02T20:14:31.133439Z" |
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.877</td> \n", |
| 347 | + " <th>Dep. Variable:</th> <td>income</td> <th> R-squared: </th> <td> 0.887</td> \n", |
348 | 348 | "</tr>\n",
|
349 | 349 | "<tr>\n",
|
350 |
| - " <th>Model:</th> <td>IV2SLS</td> <th> Adj. R-squared: </th> <td> 0.877</td> \n", |
| 350 | + " <th>Model:</th> <td>IV2SLS</td> <th> Adj. R-squared: </th> <td> 0.886</td> \n", |
351 | 351 | "</tr>\n",
|
352 | 352 | "<tr>\n",
|
353 |
| - " <th>Method:</th> <td>Two Stage</td> <th> F-statistic: </th> <td> 1142.</td> \n", |
| 353 | + " <th>Method:</th> <td>Two Stage</td> <th> F-statistic: </th> <td> 1182.</td> \n", |
354 | 354 | "</tr>\n",
|
355 | 355 | "<tr>\n",
|
356 |
| - " <th></th> <td>Least Squares</td> <th> Prob (F-statistic):</th> <td>1.60e-167</td>\n", |
| 356 | + " <th></th> <td>Least Squares</td> <th> Prob (F-statistic):</th> <td>1.73e-171</td>\n", |
357 | 357 | "</tr>\n",
|
358 | 358 | "<tr>\n",
|
359 | 359 | " <th>Date:</th> <td>Thu, 02 Nov 2023</td> <th> </th> <td> </td> \n",
|
360 | 360 | "</tr>\n",
|
361 | 361 | "<tr>\n",
|
362 |
| - " <th>Time:</th> <td>19:08:45</td> <th> </th> <td> </td> \n", |
| 362 | + " <th>Time:</th> <td>20:14:31</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.2987</td> <td> 1.066</td> <td> 9.665</td> <td> 0.000</td> <td> 8.208</td> <td> 12.390</td>\n", |
| 379 | + " <th>Intercept</th> <td> 10.4975</td> <td> 1.064</td> <td> 9.866</td> <td> 0.000</td> <td> 8.409</td> <td> 12.586</td>\n", |
380 | 380 | "</tr>\n",
|
381 | 381 | "<tr>\n",
|
382 |
| - " <th>education</th> <td> 3.9275</td> <td> 0.116</td> <td> 33.797</td> <td> 0.000</td> <td> 3.699</td> <td> 4.156</td>\n", |
| 382 | + " <th>education</th> <td> 3.9636</td> <td> 0.115</td> <td> 34.376</td> <td> 0.000</td> <td> 3.737</td> <td> 4.190</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.155</td> <th> Durbin-Watson: </th> <td> 1.963</td>\n", |
| 387 | + " <th>Omnibus:</th> <td> 0.255</td> <th> Durbin-Watson: </th> <td> 1.980</td>\n", |
388 | 388 | "</tr>\n",
|
389 | 389 | "<tr>\n",
|
390 |
| - " <th>Prob(Omnibus):</th> <td> 0.561</td> <th> Jarque-Bera (JB): </th> <td> 1.025</td>\n", |
| 390 | + " <th>Prob(Omnibus):</th> <td> 0.880</td> <th> Jarque-Bera (JB): </th> <td> 0.284</td>\n", |
391 | 391 | "</tr>\n",
|
392 | 392 | "<tr>\n",
|
393 |
| - " <th>Skew:</th> <td> 0.064</td> <th> Prob(JB): </th> <td> 0.599</td>\n", |
| 393 | + " <th>Skew:</th> <td> 0.038</td> <th> Prob(JB): </th> <td> 0.867</td>\n", |
394 | 394 | "</tr>\n",
|
395 | 395 | "<tr>\n",
|
396 |
| - " <th>Kurtosis:</th> <td> 3.091</td> <th> Cond. No. </th> <td> 26.0</td>\n", |
| 396 | + " <th>Kurtosis:</th> <td> 2.968</td> <th> Cond. No. </th> <td> 25.9</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.877 \\\\\n", |
405 |
| - "\\textbf{Model:} & IV2SLS & \\textbf{ Adj. R-squared: } & 0.877 \\\\\n", |
406 |
| - "\\textbf{Method:} & Two Stage & \\textbf{ F-statistic: } & 1142. \\\\\n", |
407 |
| - "\\textbf{} & Least Squares & \\textbf{ Prob (F-statistic):} & 1.60e-167 \\\\\n", |
| 404 | + "\\textbf{Dep. Variable:} & income & \\textbf{ R-squared: } & 0.887 \\\\\n", |
| 405 | + "\\textbf{Model:} & IV2SLS & \\textbf{ Adj. R-squared: } & 0.886 \\\\\n", |
| 406 | + "\\textbf{Method:} & Two Stage & \\textbf{ F-statistic: } & 1182. \\\\\n", |
| 407 | + "\\textbf{} & Least Squares & \\textbf{ Prob (F-statistic):} & 1.73e-171 \\\\\n", |
408 | 408 | "\\textbf{Date:} & Thu, 02 Nov 2023 & \\textbf{ } & \\\\\n",
|
409 |
| - "\\textbf{Time:} & 19:08:45 & \\textbf{ } & \\\\\n", |
| 409 | + "\\textbf{Time:} & 20:14:31 & \\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.2987 & 1.066 & 9.665 & 0.000 & 8.208 & 12.390 \\\\\n", |
419 |
| - "\\textbf{education} & 3.9275 & 0.116 & 33.797 & 0.000 & 3.699 & 4.156 \\\\\n", |
| 418 | + "\\textbf{Intercept} & 10.4975 & 1.064 & 9.866 & 0.000 & 8.409 & 12.586 \\\\\n", |
| 419 | + "\\textbf{education} & 3.9636 & 0.115 & 34.376 & 0.000 & 3.737 & 4.190 \\\\\n", |
420 | 420 | "\\bottomrule\n",
|
421 | 421 | "\\end{tabular}\n",
|
422 | 422 | "\\begin{tabular}{lclc}\n",
|
423 |
| - "\\textbf{Omnibus:} & 1.155 & \\textbf{ Durbin-Watson: } & 1.963 \\\\\n", |
424 |
| - "\\textbf{Prob(Omnibus):} & 0.561 & \\textbf{ Jarque-Bera (JB): } & 1.025 \\\\\n", |
425 |
| - "\\textbf{Skew:} & 0.064 & \\textbf{ Prob(JB): } & 0.599 \\\\\n", |
426 |
| - "\\textbf{Kurtosis:} & 3.091 & \\textbf{ Cond. No. } & 26.0 \\\\\n", |
| 423 | + "\\textbf{Omnibus:} & 0.255 & \\textbf{ Durbin-Watson: } & 1.980 \\\\\n", |
| 424 | + "\\textbf{Prob(Omnibus):} & 0.880 & \\textbf{ Jarque-Bera (JB): } & 0.284 \\\\\n", |
| 425 | + "\\textbf{Skew:} & 0.038 & \\textbf{ Prob(JB): } & 0.867 \\\\\n", |
| 426 | + "\\textbf{Kurtosis:} & 2.968 & \\textbf{ Cond. No. } & 25.9 \\\\\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.877\n", |
438 |
| - "Model: IV2SLS Adj. R-squared: 0.877\n", |
439 |
| - "Method: Two Stage F-statistic: 1142.\n", |
440 |
| - " Least Squares Prob (F-statistic): 1.60e-167\n", |
| 437 | + "Dep. Variable: income R-squared: 0.887\n", |
| 438 | + "Model: IV2SLS Adj. R-squared: 0.886\n", |
| 439 | + "Method: Two Stage F-statistic: 1182.\n", |
| 440 | + " Least Squares Prob (F-statistic): 1.73e-171\n", |
441 | 441 | "Date: Thu, 02 Nov 2023 \n",
|
442 |
| - "Time: 19:08:45 \n", |
| 442 | + "Time: 20:14:31 \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.2987 1.066 9.665 0.000 8.208 12.390\n", |
450 |
| - "education 3.9275 0.116 33.797 0.000 3.699 4.156\n", |
| 449 | + "Intercept 10.4975 1.064 9.866 0.000 8.409 12.586\n", |
| 450 | + "education 3.9636 0.115 34.376 0.000 3.737 4.190\n", |
451 | 451 | "==============================================================================\n",
|
452 |
| - "Omnibus: 1.155 Durbin-Watson: 1.963\n", |
453 |
| - "Prob(Omnibus): 0.561 Jarque-Bera (JB): 1.025\n", |
454 |
| - "Skew: 0.064 Prob(JB): 0.599\n", |
455 |
| - "Kurtosis: 3.091 Cond. No. 26.0\n", |
| 452 | + "Omnibus: 0.255 Durbin-Watson: 1.980\n", |
| 453 | + "Prob(Omnibus): 0.880 Jarque-Bera (JB): 0.284\n", |
| 454 | + "Skew: 0.038 Prob(JB): 0.867\n", |
| 455 | + "Kurtosis: 2.968 Cond. No. 25.9\n", |
456 | 456 | "==============================================================================\n",
|
457 | 457 | "\"\"\""
|
458 | 458 | ]
|
|
0 commit comments