I am working with the synthetic control method in Stata and its synth2 command. I am looking at exports from country X to country Y. My main aim is to examine how the export levels of my commodity of interest (steel commodity) were altered following the imposition of an import tariff. My treated unit is export values of the steel commodities, where the variable name is 7273, and in my donor pool I have export values of 11 other commodities, where the variable names are two-digit HTS-codes. I have done the following code:
gen time = ym(year, month)
format time %tm
reshape long hts, i(time) j(hts_id)
tsset hts_id time
The data is structured in the following way:
Time HTS EUR/USD exchange rate GDPgrowth
2010m1 HTS:z value:... Exchange rate 2010m1 GDPgrowth 2010m1
2010m2 HTS:z value:... Exchange rate 2010m2 GDPgrowth 2010m2
.
.
.
.
.
2010m1 HTS: w value:... Exchange rate 2010m1 GDPgrowth 2010m1
2010m2 HTS: w value:... Exchange rate 2010m2 GDPgrowth 2010m2
.
.
.
.
2010m1 HTS: v value:... Exchange rate 2010m1 GDPgrowth 2010m1
2010m2 HTS: v value:... Exchange rate 2010m2 GDPgrowth 2010m2
.
.
.
.
When I run the code
synth2 hts hts(10) hts(20) hts(30), trunit(7273) trperiod(31) nested fig
everything works well
My problem with this is that I want to include EUR/USD exchange rate and GDPgrowth as additional predictor variables, but since they are constant for every year, they are re-occuring in the same order for all my different observations.
When I run my code
synth2 hts eurusd gdpgrowth hts(10) hts(20) hts(30), trunit(7273) trperiod(31) nested fig
The code runs, but I do not get any results as no synthetic is formed. What can I do to fix this? I really want to include additional predictors in my SCM.
gen time = ym(year, month)
format time %tm
reshape long hts, i(time) j(hts_id)
tsset hts_id time
The data is structured in the following way:
Time HTS EUR/USD exchange rate GDPgrowth
2010m1 HTS:z value:... Exchange rate 2010m1 GDPgrowth 2010m1
2010m2 HTS:z value:... Exchange rate 2010m2 GDPgrowth 2010m2
.
.
.
.
.
2010m1 HTS: w value:... Exchange rate 2010m1 GDPgrowth 2010m1
2010m2 HTS: w value:... Exchange rate 2010m2 GDPgrowth 2010m2
.
.
.
.
2010m1 HTS: v value:... Exchange rate 2010m1 GDPgrowth 2010m1
2010m2 HTS: v value:... Exchange rate 2010m2 GDPgrowth 2010m2
.
.
.
.
When I run the code
synth2 hts hts(10) hts(20) hts(30), trunit(7273) trperiod(31) nested fig
everything works well
My problem with this is that I want to include EUR/USD exchange rate and GDPgrowth as additional predictor variables, but since they are constant for every year, they are re-occuring in the same order for all my different observations.
When I run my code
synth2 hts eurusd gdpgrowth hts(10) hts(20) hts(30), trunit(7273) trperiod(31) nested fig
The code runs, but I do not get any results as no synthetic is formed. What can I do to fix this? I really want to include additional predictors in my SCM.
Comment