Some related readings: - The Causal Mixtape - does not feel enough hands on … - Econ data is rarely available and even less so introduced in Quarto … - Course material by Andrew Heiss - does feel hands on, as he provides a dataset …
Some notes
natural experiments: naturally occuring variation in some treatment variable that affects only some units over time
social scientist often rely on natural experimetns that mimic important elements of randomized experiments
exmaples include natural experiment caused by army enlistment (can’t find the exact source but I remember hearing this from a professor from my college)
key assumption with DD design: no time-variant subject specific unobservables, i.e., the parallel trend assumption.
1 a \(2 times 2\) DD design
David Card’s classic minimum wage study
… referring to Card and Krueger (1994).
… Beautiful pictures displaying the “first stage” effect of the intervention on the treatment are crucial in the rhetori of causal inference, and few have done it as well as Card and Krueger.
Some practice
library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr 1.1.4 ✔ readr 2.1.5
✔ forcats 1.0.1 ✔ stringr 1.5.2
✔ ggplot2 4.0.0 ✔ tibble 3.3.0
✔ lubridate 1.9.4 ✔ tidyr 1.3.1
✔ purrr 1.1.0
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
theme_set(theme_minimal())df <- wooldridge::injury %>%as_tibble(.) %>%rename(duration = durat, log_duration = ldurat,after_1980 = afchnge) %>%# just use observations from kentuck filter(ky ==1)df