Skip to content

Commit 2fe15ed

Browse files
author
Paul Schrimpf
committed
Automated updates to slides.
1 parent 81c94cd commit 2fe15ed

98 files changed

Lines changed: 7140 additions & 8178 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

lectures/paul/causality_intro.html

Lines changed: 179 additions & 390 deletions
Large diffs are not rendered by default.

lectures/paul/causality_intro.ipynb

Lines changed: 37 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"\n",
7777
"## Selection Bias\n",
7878
"\n",
79-
"- Comparing ATE and APE $$ %\n",
79+
"- Comparing ATE and average population effect $$ %\n",
8080
" \\begin{align*}\n",
8181
" ATE = & \\Er[Y_i(1) - Y_i(0)] \\\\\n",
8282
" = & \\overbrace{\\Er[Y_i(1) - Y_i(0) | T_i=1]}^{\\text{avg treatment effect on treated}} P(T_i=1) + \\overbrace{\\Er[Y_i(1) - Y_i(0) | T_i=0]}^{\\text{avg treatment effect on untreated}} P(T_i=0) \\\\\n",
@@ -109,7 +109,18 @@
109109
" - $\\epsilon_i(d) \\sim N(0,\\sigma^2)$, independent\n",
110110
" - Chooses $\\max_d \\Er[Y_i(d)|S_i(0), S_i(1)] = \\max_d S_i(d)$\n",
111111
"\n",
112-
"``` python\n",
112+
"## Selection Bias Example"
113+
],
114+
"id": "27d91c9d-ce50-4c4e-975d-c2b064446aa8"
115+
},
116+
{
117+
"cell_type": "code",
118+
"execution_count": 1,
119+
"metadata": {
120+
"output-location": "slide"
121+
},
122+
"outputs": [],
123+
"source": [
113124
"import numpy as np\n",
114125
"np.random.seed(0)\n",
115126
"class selectiondata:\n",
@@ -144,14 +155,14 @@
144155
"print(\"|APE|ATE|Selection Bias|\\n\" +\n",
145156
" \"|---|---|---|\\n\" +\n",
146157
" f\"|{data.APE():.2}|{data.ATE():.2}|{data.selectionbias():.2}|\\n\"\n",
147-
" f\"|σ={s:.2}|\\n\\n\")\n",
148-
"```\n",
149-
"\n",
150-
"| APE | ATE | Selection Bias |\n",
151-
"|-------|------|----------------|\n",
152-
"| 0.27 | 0.53 | -0.26 |\n",
153-
"| σ=0.5 | | |\n",
154-
"\n",
158+
" f\"|σ={s:.2}|\\n\\n\")"
159+
],
160+
"id": "1168a686"
161+
},
162+
{
163+
"cell_type": "markdown",
164+
"metadata": {},
165+
"source": [
155166
"# Random Experiments\n",
156167
"\n",
157168
"## Random Experiment\n",
@@ -183,12 +194,14 @@
183194
"\n",
184195
"## Example Pfizer Covid Vaccine RCT"
185196
],
186-
"id": "8cf0bac1-836d-44a0-9df0-7c4bccf9940e"
197+
"id": "99c95cd9-b1fd-42d4-8141-377621fdb856"
187198
},
188199
{
189200
"cell_type": "code",
190-
"execution_count": 3,
191-
"metadata": {},
201+
"execution_count": 2,
202+
"metadata": {
203+
"output-location": "slide"
204+
},
192205
"outputs": [
193206
{
194207
"output_type": "stream",
@@ -244,21 +257,22 @@
244257
"\n",
245258
"print(\"\\n- All\\n\\n\" + pfizerall.table() + \"\\n - 65+\\n\\n\" + pfizer65.table())"
246259
],
247-
"id": "09523551"
260+
"id": "b29841c4"
248261
},
249262
{
250263
"cell_type": "markdown",
251264
"metadata": {},
252265
"source": [
253266
"## Sources and Further Reading\n",
254267
"\n",
255-
"- [Chapter\n",
256-
" 2](https://causalml-book.org/assets/chapters/CausalML_chap_2.pdf) of\n",
257-
" Chernozhukov et al. (2024) is the basis for much of these slides,\n",
268+
"- [Chapter 2](http://chapters.causalml-book.org/CausalML_chap_2.pdf)\n",
269+
" of Chernozhukov et al. (2024) is the basis for much of these slides,\n",
258270
" inlcuding the Pfizer/BioNTech Covid Vaccine RCT example\n",
259271
"- [Chapter\n",
260272
" 1](https://matheusfacure.github.io/python-causality-handbook/01-Introduction-To-Causality.html)\n",
261273
" of Facure (2022)\n",
274+
"- Heckman and Pinto (2024) for a critique of potential outcomes and\n",
275+
" argument to use more structured economic models\n",
262276
"\n",
263277
"## References\n",
264278
"\n",
@@ -267,9 +281,13 @@
267281
"<https://causalml-book.org/>.\n",
268282
"\n",
269283
"Facure, Matheus. 2022. *Causal Inference for the Brave and True*.\n",
270-
"<https://matheusfacure.github.io/python-causality-handbook/landing-page.html>."
284+
"<https://matheusfacure.github.io/python-causality-handbook/landing-page.html>.\n",
285+
"\n",
286+
"Heckman, James, and Rodrigo Pinto. 2024. “Econometric Causality: The\n",
287+
"Central Role of Thought Experiments.” *Journal of Econometrics* 243 (1):\n",
288+
"105719. https://doi.org/<https://doi.org/10.1016/j.jeconom.2024.105719>."
271289
],
272-
"id": "d369e916-c521-4e77-8261-95dd7d766074"
290+
"id": "52171e20-38bd-4c0e-9b8b-6cecc19dcbd0"
273291
}
274292
],
275293
"nbformat": 4,

lectures/paul/conditionaleffect.html

Lines changed: 419 additions & 637 deletions
Large diffs are not rendered by default.

lectures/paul/conditionaleffect.ipynb

Lines changed: 81 additions & 96 deletions
Large diffs are not rendered by default.
-53.6 KB
Loading
3.2 KB
Loading
-12.4 KB
Loading
12.5 KB
Loading
1.76 KB
Loading

lectures/paul/did.html

Lines changed: 199 additions & 415 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)