I will use the data and code from synth_runner help file to illustrate the problem.
Code:
clear all
use smoking, clear
tsset state year
capture drop D
program my_pred, rclass
    args tyear
    return local predictors "beer(`=`tyear'-4'(1)`=`tyear'-1') lnincome(`=`tyear'-4'(1)`=`tyear'-1')"
end
program my_drop_units
    args tunit
    if `tunit'==39 qui drop if inlist(state,21,38)
    if `tunit'==3 qui drop if state==21
end
program my_xperiod, rclass
    args tyear
    return local xperiod "`=`tyear'-12'(1)`=`tyear'-1'"
end
program my_mspeperiod, rclass
args tyear
    return local mspeperiod "`=`tyear'-12'(1)`=`tyear'-1'"
end
generate byte D = (state==3 & year>=1989) | (state==7 & year>=1988)
* Specification 1
synth_runner cigsale retprice age15to24, d(D) pred_prog(my_pred) trends training_propr(`=13/18') drop_units_prog(my_drop_units)) xperiod_prog(my_xperiod) mspeperiod_prog(my_mspeperiod)
* Specification 2: add cigsale(1980) as a potential predictor
synth_runner cigsale cigsale(1980) retprice age15to24, d(D) pred_prog(my_pred) trends training_propr(`=13/18') drop_units_prog(my_drop_units)) xperiod_prog(my_xperiod) mspeperiod_prog(my_mspeperiod)| Specification 1 | |||
| Post-treatment results: Effects, p-values, standardized p-values | |||
| estimates | pvals | pvals_std | |
| c1 | -0.027493 | 0.3002191 | 0.0021914 | 
| c2 | -0.0485773 | 0.1775018 | 0.0043828 | 
| c3 | -0.0921521 | 0.0394449 | 0 | 
| c4 | -0.1017043 | 0.0409058 | 0 | 
| c5 | -0.1270111 | 0.0241052 | 0 | 
| c6 | -0.1352273 | 0.0219138 | 0 | 
| c7 | -0.141674 | 0.0262966 | 0 | 
| c8 | -0.196867 | 0.0051132 | 0 | 
| c9 | -0.1754307 | 0.0124178 | 0 | 
| c10 | -0.1833944 | 0.0197224 | 0 | 
| c11 | -0.1910038 | 0.0233747 | 0 | 
| c12 | -0.1889059 | 0.0219138 | 0 | 
| Specification 2 | |||
| Post-treatment results: Effects, p-values, standardized p-values | |||
| estimates | pvals | pvals_std | |
| c1 | -0.027493 | 0.3002191 | 0.0021914 | 
| c2 | -0.0485773 | 0.1775018 | 0.0043828 | 
| c3 | -0.0921521 | 0.0394449 | 0 | 
| c4 | -0.1017043 | 0.0409058 | 0 | 
| c5 | -0.1270111 | 0.0241052 | 0 | 
| c6 | -0.1352273 | 0.0219138 | 0 | 
| c7 | -0.141674 | 0.0262966 | 0 | 
| c8 | -0.196867 | 0.0051132 | 0 | 
| c9 | -0.1754307 | 0.0124178 | 0 | 
| c10 | -0.1833944 | 0.0197224 | 0 | 
| c11 | -0.1910038 | 0.0233747 | 0 | 
| c12 | -0.1889059 | 0.0219138 | 0 | 
0 Response to synth_runner automatically generated predictorvars
Post a Comment