Hello,
I would like to run a SCM in a state-year panel using the synth command. In the basic setting synth just allows for a single treatment period (here denoted by "year"). However, I would like to run a loop over each U.S. state using different treatment periods according to particular changes in legislation.
My code is the following:
I also tried synth_runner since it allows for an adjustment of the treatment period. However, from my point of view, synth_runner is not suitable if you want to examine individual effects rather than the average effect over a set of entities.
I am grateful for any idea of how to implement that loop and account for different treatment periods (trperiod). Thank you very much in advance!
Best regards,
Philipp
I would like to run a SCM in a state-year panel using the synth command. In the basic setting synth just allows for a single treatment period (here denoted by "year"). However, I would like to run a loop over each U.S. state using different treatment periods according to particular changes in legislation.
My code is the following:
Code:
egen stat_fps = group(state_fips) tsset stat_fps year forvalues stat_fps = 1(1)51 { synth income_gr $x , trunit(`stat_fps') mspeperiod(1985(1)2000) resultsperiod(1985(1)2018) trperiod("year") unitnames(state_name) figure keep(SCM_results_`state') replace }
I am grateful for any idea of how to implement that loop and account for different treatment periods (trperiod). Thank you very much in advance!
Best regards,
Philipp
Comment