Announcement

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

  • Help with graphing results of the synthetic control method

    I've been struggling to perform placebo test and finding p-values after running a synthetic control method. The results i got are:
    Loss: Root Mean Squared Prediction Error


    ---------------------
    RMSPE | 1.404323
    ---------------------
    ------------------------------------------------------------------------------------------------------------------------
    Unit Weights:

    -----------------------
    Co_No | Unit_Weight
    ----------+------------
    1 | 0
    2 | .133
    3 | .491
    4 | .271
    5 | .105
    6 | 0
    7 | 0
    8 | 0
    9 | 0
    10 | 0
    11 | 0
    12 | 0
    -----------------------
    ------------------------------------------------------------------------------------------------------------------------
    Predictor Balance:

    ------------------------------------------------------
    | Treated Synthetic
    -------------------------------+----------------------
    domtaxtogdp | 7.438928 5.893027
    Agricultureforestryandfishi | 33.42571 14.0593
    Debtserviceonexternaldebtt | 3.14e+08 3.72e+08
    BroadmoneyofGDP | 29.42877 45.3518
    Debtserviceonexternaldebtt | 3.14e+08 3.72e+08
    Exportsofgoodsandservices | 35.71216 35.86212
    Foreigndirectinvestmentneti | 3.793209 5.617001
    Importsofgoodsandservices | 53.39756 52.23179
    Inflationconsumerpricesannu | 18.47533 13.05279
    TradeofGDP | 89.10973 88.09391
    GDPpercapitacurrentUS | 639.9211 1818.518



    When i try to run a placebo test with the following command:

    tempname resmat

    forvalues i = 1/12 {

    synth taxtogdp domtaxtogdp Agricultureforestryandfishi BroadmoneyofGDP Debtserviceonexternaldebtt Exportsofgoodsandservices Foreigndirectinvestmentneti GDPpercapitacurrentUS Importsofgoodsandservices Inflationconsumerpricesannu taxtogdp(2000) taxtogdp(2018) taxtogdp(2005) , trunit(`13') trperiod(2010) xperiod(2010(1)2018) keep(test`i')

    matrix `resmat' = nullmat(`resmat') \ e(RMSPE)

    local names `"`names' `"`i'"'"'

    }

    mat colnames `resmat' = "RMSPE"

    mat rownames `resmat' = "names"

    matlist `resmat' , row("Treated Unit")

    I get
    invalid syntax
    r(198);

    .
    . mat colnames `resmat' = 13 "RMSPE"
    matrix __000009 not found
    r(111);

    .
    . mat rownames `resmat' = 13 "names"
    matrix __000009 not found
    r(111);

    .
    . matlist `resmat' , row("Treated Unit")
    __000009 not found
    r(111);

    Any help with what I might be doing inaccurately?

  • #2
    I suggest taking a look at the synth_runner package and accompanying article from the Stata Journal.

    Galiani, Sebastian, and Brian Quistorff. "The synth_runner package: Utilities to automate synthetic control estimation using synth." The Stata Journal 17, no. 4 (2017): 834-849.
    https://journals.sagepub.com/doi/pdf...867X1801700404

    Comment


    • #3
      Many thanks, Justin.

      Comment

      Working...
      X