Announcement

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

  • Synthetic Control Method - add predictors

    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.

  • #2
    Eva:
    welcome to this forum.
    It may be that the inclusion of a constant predictor makes the weights algorithm to gasp.
    Try with a different predictor (or set if predictors).
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Thank you Carlo.

      Yes, I was thinking the same thing. But given the setup of my data and only having observations from country X to country Y, will it not be the case that all possible predictors will be constant? I have also tried to include electricity prices of country X as a predictor, and that also varies over time but is also recurring in the same order for all my different observations.

      Hence, these three predictors varies over time, but are recurring in the same order for all my different observations. I have tried to run them separately, and also all together. Is there no way to fix this and include these predictors in my SCM?

      Kind regards,
      Eva

      Comment


      • #4
        Eva:
        if all your predictors are constant (that is, they do not vary across time within panels and/or observations between panels), there's no way you can make it work.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment

        Working...
        X