7.3 An example: Evaluating the impact of Medicaid expansion on uninsured rate
Let’s take a concrete example.
Say, we are interested in evaluating the impacts of ACA-Medicaid expansion on insurance outcomes. Following the supreme court decision in 2012 that deemed Medicaid expansion voluntary, 26 states expanded Medicaid in 2014, while the rest did not. In fact, 19 states did not expand Medicaid until 2018.
Data for this example comes from one of my projects and can be downloaded from github. We are looking at the county-level data, where our outcome variable is the uninsured rate. We want to evaluate the ATT. What is the effect of ACA-Medicaid expansion reform on uninsured rates?
We will draw our attention to the states that expanded Medicaid in 2014 plus the 19 states that did not expand Medicaid until 2018. States that expanded Medicaid between 2014 and 2018 are dropped from the sample. This is to avoid the case of bad comparison, an issue that arises from comparing early treated units with later treated units. We will reflect on this topic later.
For now, let’s take a quick look at the data.
user = Sys.info()["nodename"]
if(user == "vinish-Legion-Pro-7-16IRX9H"){
source("/home/vinish/Dropbox/Medicaid_South/code/filepath.r")
}else{
source("/Users/user1/Dropbox/Medicaid_South/code/filepath.r")
}
library(pacman)
p_load(fixest, dplyr, ggplot2, tidyverse, patchwork, arrow)
# load in county level uninsured rate data merged with other variables
mort_allcauses <- read_feather( file.path(datapath, "NVSS_data_county_2010to2017_merged_allcauses.feather")) %>%
mutate(treat = ifelse(is.na(treat) == T, "control 3", treat)) %>%
filter(yearexpand == 2014 & age == 0 & race_name == "white") %>%
dplyr::select("countyfips", "year", "state.abb", "expand", "yearexpand", "sahieunins138", "GovernorisDemocrat1Yes") %>%
filter(duplicated(.)) %>%
arrange(countyfips, year) # sort by countyfips and year
# the select() function is masked
# by other packages, so use dplyr::select() instead
# only keep the years 2013 and 2014 for the canonical case
dat_canonical <- mort_allcauses %>%
filter(year %in% c(2013, 2014))
head(dat_canonical)## # A tibble: 6 × 7
## countyfips year state.abb expand yearexpand sahieunins138 GovernorisDemocrat1Yes
## <dbl> <dbl> <chr> <dbl> <dbl> <dbl> <int>
## 1 1001 2013 AL 0 2014 39.6 0
## 2 1001 2014 AL 0 2014 31.9 0
## 3 1003 2013 AL 0 2014 45.1 0
## 4 1003 2014 AL 0 2014 43.8 0
## 5 1005 2013 AL 0 2014 37.3 0
## 6 1005 2014 AL 0 2014 34 0
## state.abb 0 1
## AL 126 0
## AR 0 144
## AZ 0 30
## CA 0 112
## CO 0 106
## CT 0 8
## DE 0 6
## FL 134 0
## GA 291 0
## IA 0 196
## ID 84 0
## IL 0 196
## KS 181 0
## KY 0 240
## MA 0 28
## MD 0 48
## ME 32 0
## MI 0 164
## MN 0 168
## MO 230 0
## MS 149 0
## NC 198 0
## ND 0 79
## NE 144 0
## NH 0 20
## NJ 0 39
## NM 0 50
## NV 0 26
## NY 0 124
## OH 0 174
## OK 148 0
## OR 0 66
## RI 0 10
## SC 88 0
## SD 98 0
## TN 190 0
## TX 409 0
## UT 54 0
## VA 248 0
## VT 0 26
## WA 0 72
## WI 136 0
## WV 0 110
## WY 46 0
## The expansion states are:
##
## AR AZ CA CO CT DE IA IL KY MA MD MI MN ND NH NJ NM NV NY OH OR RI VT WA WV
## 144 30 112 106 8 6 196 196 240 28 48 164 168 79 20 39 50 26 124 174 66 10 26 72 110
## The non-expansion states are:
##
## AL FL GA ID KS ME MO MS NC NE OK SC SD TN TX UT VA WI WY
## 126 134 291 84 181 32 230 149 198 144 148 88 98 190 409 54 248 136 46
## [1] 25
## [1] 19
The two groups are as follows:
Expansion states (treated): AR, AZ, CA, CO, CT, DE, HI, IA, IL, KY, MA, MD, MI, MN, ND, NH, NJ, NM, NV, NY, OH, OR, RI, VT, WA, WV
Non-expansion states (control): AL, FL, GA, ID, KS, ME, MO, MS, NC, NE, OK, SC, SD, TN, TX, UT, VA, WI, WY