This repo provides replication code for the book “Casual Inference: The Mixtape” by Scott Cunningham.
-
Instrumental variables
-
Panel data
-
Differences-in-differences
-
Synthetic control
Most of the code relies on the following packages; note these are not explicitly loaded in the code chunks.
# tidyverse and tidyverse-adjacent
library(magrittr)
library(hms)
library(stringr)
library(lubridate)
library(forcats)
library(feather)
library(haven)
library(httr)
library(jsonlite)
library(readxl)
library(xml2)
library(rvest)
library(modelr)
library(broom)
library(blob)
library(dbplyr)
library(purrrlyr)
library(tidyverse)
# summary statistics
library(skimr)
# datasets
library(mixtape)
# figure styling
library(hrbrthemes)
# table styling
library(stargazer)