6.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.
= 2
user if(user == 1){
source("/home/user1/Dropbox/Medicaid_South/code/filepath.r")
else{
}source("/Users/vshrestha/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
<- read_feather( file.path(datapath, "NVSS_data_county_2010to2017_merged_allcauses.feather")) %>%
mort_allcauses mutate(treat = ifelse(is.na(treat) == T, "control 3", treat)) %>%
filter(yearexpand == 2014 & age == 0 & race_name == "white") %>%
::select("countyfips", "year", "state.abb", "expand", "yearexpand", "sahieunins138", "GovernorisDemocrat1Yes") %>%
dplyrfilter(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
<- mort_allcauses %>%
dat_canonical 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
%>% tabyl(state.abb, expand) dat_canonical
## state.abb 0 1
## AL 134 0
## AR 0 150
## AZ 0 30
## CA 0 115
## CO 0 126
## CT 0 16
## DE 0 6
## FL 134 0
## GA 318 0
## HI 0 8
## IA 0 198
## ID 88 0
## IL 0 204
## KS 210 0
## KY 0 240
## MA 0 28
## MD 0 48
## ME 32 0
## MI 0 166
## MN 0 174
## MO 230 0
## MS 163 0
## NC 200 0
## ND 0 106
## NE 185 0
## NH 0 20
## NJ 0 42
## NM 0 66
## NV 0 33
## NY 0 124
## OH 0 176
## OK 154 0
## OR 0 72
## RI 0 10
## SC 92 0
## SD 131 0
## TN 190 0
## TX 507 0
## UT 58 0
## VA 264 0
## VT 0 28
## WA 0 78
## WI 144 0
## WV 0 110
## WY 46 0
cat("The expansion states are: \n")
## The expansion states are:
table(dat_canonical$state.abb[dat_canonical$expand == 1])
##
## AR AZ CA CO CT DE HI IA IL KY MA MD MI MN ND NH NJ NM NV NY OH OR
## 150 30 115 126 16 6 8 198 204 240 28 48 166 174 106 20 42 66 33 124 176 72
## RI VT WA WV
## 10 28 78 110
cat("The non-expansion states are: \n")
## The non-expansion states are:
table(dat_canonical$state.abb[dat_canonical$expand == 0])
##
## AL FL GA ID KS ME MO MS NC NE OK SC SD TN TX UT VA WI WY
## 134 134 318 88 210 32 230 163 200 185 154 92 131 190 507 58 264 144 46
length(table(dat_canonical$state.abb[dat_canonical$expand == 1]))
## [1] 26
length(table(dat_canonical$state.abb[dat_canonical$expand == 0]))
## [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