Hi all,
I have a question regarding the correct process for a generalized diff in diff. I am looking at state-level policies that were implemented in various years in various states across a 13-year period (2008-2020). The policies in question (variable: policy) have been grouped into three categories (1 (neutral), 2 (restrictive), 3 (protective)) for levels of impact. I am most interested in policy level 2. Each state fits one of these three categories each year; however, their policy "categories" or levels of restriction change over time. Some states increased restrictions over the 13-year period, others decreased them, some remained the same, all at different time points. My sample includes all 50 states (variable: state2).
I am attempting a diff in diff with state and year fixed effects to assess the impact of the degree of policy restrictions on a continuous variable (variable: mcaid_total). I would love some guidance to ensure I'm on the right track with my approach.
Here is a sample of my data:
Currently, I am doing the following in stata:
mcaid_total is my outcome, mcaid_expansion is a covariate, and policy is my independent variable.
Is this correct for this test? Am I missing something to measure validity?
Also, is there a way to create a visual for the parallel trend assumption, such as a chart with years before and after policy implementation on the x axis and change in medicaid expenditures (my outcome of interest) on the y axis?
Thank you so much for your help!
I have a question regarding the correct process for a generalized diff in diff. I am looking at state-level policies that were implemented in various years in various states across a 13-year period (2008-2020). The policies in question (variable: policy) have been grouped into three categories (1 (neutral), 2 (restrictive), 3 (protective)) for levels of impact. I am most interested in policy level 2. Each state fits one of these three categories each year; however, their policy "categories" or levels of restriction change over time. Some states increased restrictions over the 13-year period, others decreased them, some remained the same, all at different time points. My sample includes all 50 states (variable: state2).
I am attempting a diff in diff with state and year fixed effects to assess the impact of the degree of policy restrictions on a continuous variable (variable: mcaid_total). I would love some guidance to ensure I'm on the right track with my approach.
Here is a sample of my data:
Code:
input int year long state2 float(policy mcaid_total) 2008 1 2 4400 2009 1 2 5048 2010 1 2 5394 2011 1 2 5244 2012 1 2 5627 2013 1 2 5586 2014 1 2 5811 2015 1 2 6083 2016 1 2 6354 2017 1 2 6490 2018 1 2 6580 2019 1 2 6977 2020 1 2 7404 2008 2 1 971 2009 2 1 1018 2010 2 1 1171 2011 2 1 1361 2012 2 1 1369 2013 2 1 1388 2014 2 1 1422.9962 2015 2 1 1554.8275 2009 5 3 40235 2010 5 3 39151 2011 5 3 51503 2012 5 3 43052 2013 5 3 46399 label values state2 state2 label def state2 1 "Alabama", modify label def state2 2 "Alaska", label def state2 5 "California", modify label values policy policy label def policy 1 "Neutral", modify label def policy 2 "Restrictive", modify label def policy 3 "Protective", modify
Code:
xtset state2 year xtreg mcaid_total mcaid_expansion i.policy i.year, fe
Is this correct for this test? Am I missing something to measure validity?
Also, is there a way to create a visual for the parallel trend assumption, such as a chart with years before and after policy implementation on the x axis and change in medicaid expenditures (my outcome of interest) on the y axis?
Thank you so much for your help!

Comment