Announcement

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

  • Problem getting synthetic control to run

    hello everyone,
    I am trying to use synthetic control for my capstone project. I have recently got a new mac computer and have downloaded Stata/BE 17.0 and decided to go over a homework my teacher gave me last semester to brush up on implementing synthetic control. below is the code i've been working with.

    * 1 step - install synth package /* method 1 - simple update all ssc install synth, replace all */ /* method 2 - if method 1 does not work, try this one and here is a link to support page *https://web.stanford.edu/~jhain/synthpage.html net from "https://web.stanford.edu/~jhain/Synth" net install synth, all replace force */ clear sysuse smoking tsset state year * this code will produce results used in Table 1, 2 and Figure 2 synth cigsale beer(1984(1)1988) lnincome retprice age15to24 cigsale(1988) cigsale(1980) cigsale(1975), trunit(3) trperiod(1989) xperiod(1980(1)1988) nested fig


    When i attempt to run method 1- .
    ssc install synth, replace all i get ssc install: "synth" not found at SSC, type search synth (To find all packages at SSC that start with s, type ssc describe s) r(601);


    when i attempt to run method 2 i get . net install synth, all replace force checking synth consistency and verifying not already installed... the following files will be replaced: /Users/anthonycarmichael/Library/Application Support/Stata/ado/plus/s/synth.ado /Users/anthonycarmichael/Library/Application Support/Stata/ado/plus/s/synth_ll.ado /Users/anthonycarmichael/Library/Application Support/Stata/ado/plus/l/lsynth_mata_subr.mlib /Users/anthonycarmichael/Library/Application Support/Stata/ado/plus/s/synth.sthlp smoking.dta installing into /Users/anthonycarmichael/Library/Application Support/Stata/ado/plus/... installation complete. copying into current directory... copying smoking.dta ancillary files successfully copied.


    after this i run .clear sysuse smoking tsset state year this all loads



    Then i finally run synth .cigsale beer(1984(1)1988) lnincome retprice age15to24 cigsale(1988) cigsale(1980) cigsale(1975), trunit(3) trperiod(1989) xperiod(1980(1)1988) nested fig and it says
    file synthopt.plugin not found
    (error occurred while loading synth.ado)
    r(601);

    I zoomed My teacher today and she was was able to run the same code on her HP computer and it was working fine but was unsure on how to get mine to run.
    when i have looked this up online most posts have said to simply run method 2 which has not been working for me.
    any help would be appreciated thanks!



    Last edited by anthony carmichael; 16 Feb 2023, 15:21.

  • #2
    This has been discussed before on Statalist, you may find the following topic helpful

    https://www.statalist.org/forums/for...stalling-synth

    and possibly the alternatives suggested in post #5 at

    https://www.statalist.org/forums/for...01#post1689301

    Comment


    • #3
      The plugin is available from https://web.stanford.edu/~jhain/synthpage.html for download. I suspect a kind soul with a recent Mac should be able to compile it and add instructions here. Another option is to e-mail the authors with the compiled plugin to update the SCC version.

      I hope Stata will implement a native version 18 (or the matrix completion generalized version). This is a very useful method, and the current implementations have a steep learning curve.

      Comment


      • #4
        thanks so much to both of you! was able to run the code using the Rosseta emulator.

        Comment

        Working...
        X