Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • synth_runner automatically generated predictorvars

    I am using synth_runner in STATA 17. I got the exact same results when I run two specifications. depvar remains the same. In the second specification, I added one year of outcome variable in the predictorvars and it doesn't make any difference. I suspect that this is because training_proper(real>0) automatically generates predictors from both depvar and predictorvars. From the help file, it is not clear whether depvar is considered as a potential predictor. Is there any other reason that leads to the same results from these two specifications? Is there any way that I can use training_proper(real >0) option, but also use only one year's outcome variable as a predictor (I have multiple treatment units)?

    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)
    Stata output
    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



  • #2
    The help file states "If it is set to 1, then all the pretreatment period outcome variables will be used as predictors. This will make other covariate predictors redundant."
    Does it also imply if the value in training_proper is set to between 0 and 1, all the training period outcome variables are used as predictors.

    Comment


    • #3
      I don't use synth_runner because it's confusing.


      My honest to God advice to you is this: use my colleagues SCM command. It automates this much much easier (like my command, but it ain't out yet.) So for your own good, don't use synth_runner, use allsynth.

      Note that you should specify that your command is user written. I know cuz I'm the main synthetic control researcrer on this forum, but not everyone knows, so please in the future, specify that the command you're using, like this one, is a user written implementation.

      Comment


      • #4
        Hi Jared, thanks for the suggestion.

        I will mention that a command is user written in the future.
        Last edited by Jing Xu Xu; 27 Jun 2022, 05:42.

        Comment

        Working...
        X