Dear All,
I am trying to estimate synthetic control difference-in-difference case studies. The unit of observation is state-quarter, with 34 states and 26 quarters. 15 of the states are treated, with varied treatment periods spread between the 5th-24rth quarters. The remaining 19 states belong to the donor group for creating the synthetic controls. So eventually, I will have 15 case studies, one for each state.
I have tried the following code which has given me missing results:
I am not really sure why synth is unable to estimate the RMSPE. The problem may simply be with my loops....
I will be very grateful for any help I can get.
Sincerely,
Sumedha.
I am trying to estimate synthetic control difference-in-difference case studies. The unit of observation is state-quarter, with 34 states and 26 quarters. 15 of the states are treated, with varied treatment periods spread between the 5th-24rth quarters. The remaining 19 states belong to the donor group for creating the synthetic controls. So eventually, I will have 15 case studies, one for each state.
I have tried the following code which has given me missing results:
Code:
local outcome narc /*otherreason misuse suicide reasonunknown nomineff modeff majeff de > ath effmiss */ . local controlvars age015 age1624 age2534 age3544 age4554 age5564 age65plus agemiss male pop . . collapse (mean) `outcome' `controlvars' qtrtreat , by (trunit qtr) . . tsset trunit qtr panel variable: trunit (strongly balanced) time variable: qtr, 1 to 26 delta: 1 unit . . foreach y in `outcome' { 2. forvalues lname = 1/15 { 3. preserve 4. keep if (trunit==`lname'trunit>15) 5. egen maxp_`lname'=max(qtrtreat) 6. local p=maxp_`lname' 7. display `p' 8. local p1 = `p' - 1 9. display `p1' 10. /*qui*/ synth `y' `controlvars' `y'(1(1)`p1') , trunit(`lname') trperiod(`p') fig ke > ep(synthetic_casestudy_`y'_`lname', replace) 11. restore 12. } 13. } (364 observations deleted) 5 4 Synthetic Control Method for Comparative Case Studies First Step: Data Setup Data Setup successful Treated Unit: 1 Control Units: 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 Dependent Variable: narc MSPE minimized for periods: 1 2 3 4 Results obtained for periods: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 Predictors: age015 age1624 age2534 age3544 age4554 age5564 age65plus agemiss male pop narc(1(1)4) Unless period is specified predictors are averaged over: 1 2 3 4 Second Step: Run Optimization Optimization done Third Step: Obtain Results Loss: Root Mean Squared Prediction Error RMSPE . Unit Weights: Co_No Unit_Weight 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 Predictor Balance: Treated Synthetic age015 .1887048 . age1624 .2452776 . age2534 .183628 . age3544 .1065218 . age4554 .0979623 . age5564 .0652333 . age65plus .0674047 . agemiss .0452675 . male .4161599 . pop 11544.82 . narc(1(1)4) 1 . (364 observations deleted)
I will be very grateful for any help I can get.
Sincerely,
Sumedha.
Comment