Announcement

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

  • How to add conditionality when running placebo test in Synthetic Control Method

    Hi experts,

    Does anyone know how to run 'in space' placebo test in synthetic control method only for donor units whose root-mean-square error(RMSE) is small?

    When it comes to background, I am estimating the economic impact of the coup which happened in 1994 in Gambia. To estimate it, I have run synthetic control method as well as placebo test. However, when running placebo test, there are outlier outcomes that clearly deviate from the main effect, which I would like to remove. In order to get rid of it, I red a paper which ran placebo test only for donor units with limited RMSE. Yet, I am not quite sure how to do that using Stata. It would be highly appreciate if you provide me with advices. Thank you. Dataset and command used are attached.

    Code:
    //Gambia
    tsset country_id year
    
    synth rgdpe pop rconna csh_i csh_x rgdpe(1971) rgdpe(1982) rgdpe(1993), trunit(21) trperiod(1994) keep("Gambia_outout") replace fig
    
    synth_runner rgdpe pop rconna csh_i csh_x rgdpe(1971) rgdpe(1982) rgdpe(1993), trunit(21) trperiod(1994) keep("Gambia_outout") replace gen_vars
    
    single_treatment_graphs, trlinediff(-1) raw_gname( rgdpe_raw) effects_gname(rgdpe_effects) effects_ylabels(-1500(750)1500) effects_ymax(2000) effects_ymin(-2000) do_color(bluishgray)
    Attached Files

  • #2
    I'll post an example of how I'd do this later. I wouldn't use synth_runner at all

    Comment


    • #3
      I'll be super honest, if this were my problem, I'd simply use scul
      Code:
      cd E:\Tests
      
      
      
      u "https://www.statalist.org/forums/filedata/fetch?id=1684365", clear
      
      cap which labmask
      
      if _rc {
          
          ssc inst labmask, replace
      }
      
      labmask country_id, values(country)
      
      xtset country_id year, y
      
      local lbl: value label `r(panelvar)'
      
      
      loc unit ="Gambia":`lbl'
      replace coup_number = cond(year >= 1994 & `r(panelvar)'==`unit',1,0)
      
      
      
      keep country_id coup_number year rgdpe
      
      lab var coup_number "Military Coup"
      
      cls
      
      
      cap which scul
      
      if _rc {
          
          ssc inst scul, replace
      }
      
      cls
      scul rg, ///
          ahead(3) ///
          treat(coup_number) ///
          cv(adaptive) lamb(lse) ///
          pla sqerr(2)
      But my comments don't end there. This is the reason why my algorithm is an improvement over the classical variant. I don't like this specification
      Code:
      synth rgdpe pop rconna csh_i csh_x rgdpe(1971) rgdpe(1982) rgdpe(1993), trunit(21) trperiod(1994) fig nested
      because the weights that are strange. The weights are
      Code:
      ----------------------------------------
                           Co_No | Unit_Weight
      ---------------------------+------------
                          Angola |           0
                        Botswana |        .033
                      Cabo Verde |           0
                        Cameroon |           0
                        Djibouti |        .002
                           Gabon |        .024
                           Kenya |           0
                          Malawi |           0
                       Mauritius |        .034
                         Morocco |           0
                      Mozambique |           0
                         Namibia |           0
                         Senegal |        .035
                      Seychelles |         .87
      U.R. of Tanzania: Mainland |           0
                    South Africa |        .002
                          Zambia |           0
      ----------------------------------------
      but one of these, Seychelles, gets 87% (not technically) of the weight, and other nations get very little weight. Not bad by itself, I guess, but look at the country with the most weight: Seychelles! Seychelles
      is an archipelago of 115 islands in the Indian Ocean, off East Africa. It's home to numerous beaches, coral reefs and nature reserves, as well as rare animals such as giant Aldabra tortoises
      . I imagine Gambia isn't like this at all, and that they share very little in common. I don't buy, not for 5 seconds, that Seychelles matches on the underlying factor structure of Gabon (in fact, SCUL even has Seychelles as a negative predictor). The fact that classic SCM includes Seychelles suggests to me that scm isn't learning the underlying factor structure well, and thus, we have one nation receive 87% of the weights and other mainland nations receive few.


      Okay rant over. I suggest you use SCUL for this question. You can do placebos and all that good stuff. I'm the author.

      Comment


      • #4
        Dear Jared,
        Thank you for your comment and your suggestion to use SCUL to solve the problem. After installing the SCUL you developed in my stata, and I tested your command. however, nothing appears in front as the attached screenshot shows. Is there other thing to do? Thank you for your help!

        Code:
        cd E:\Tests
        u "https://www.statalist.org/forums/filedata/fetch?id=1684365", clear
        cap which labmask
        if _rc { ssc inst labmask, replace}
        labmask country_id, values(country)
        xtset country_id year, y
        local lbl: value label `r(panelvar)'
        loc unit ="Gambia":`lbl'
        replace coup_number = cond(year >= 1994 & `r(panelvar)'==`unit',1,0)
        keep country_id coup_number year rgdpe
        lab var coup_number "Military Coup"
        cls
        cap which scul
        if _rc { ssc inst scul, replace} cls scul rg, ahead(3) treat(coup_number) cv(adaptive) lamb(lse)  pla sqerr(2)
        Attached Files

        Comment

        Working...
        X