Announcement

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

  • Having issues exporting synthetic difference-in-differences results to .tex

    I want to use the user-created -sdid- command to use the synthetic difference-in-differences approach.

    However, when I run the example code described here , I get the following error: "last estimates not found
    r(301);".

    To be clear, the relevant code is
    Code:
    * load data
    webuse set www.damianclarke.net/stata/
    webuse prop99_example.dta, clear
    
    *run sdid
    eststo sdid_1: sdid packspercapita state year treated, vce(placebo) seed(2022)
    eststo sdid_2: sdid packspercapita state year treated, vce(placebo) seed(2022) covariates(r, projected)
    
    *create a table
    esttab sdid_1 sdid_2, starlevel ("*" 0.10 "**" 0.05 "***" 0.01) b(%-9.3f) se(%-9.3f)
    ...and I get the following error message:
    Click image for larger version

Name:	Screen Shot 2022-09-27 at 9.06.32 AM.png
Views:	1
Size:	44.9 KB
ID:	1683496



    Any help would be much appreciated!

  • #2
    Hi Noah Spencer , I think the problem is with the covariate, in this example I define a variable called r using
    Code:
    gen r=runiform()
    Try again to run this line before estimates!

    ps: I think the other explanation to this is that you need the latest version of sdid from github on your computer, reinstall using
    Code:
    net install sdid, from("https://raw.githubusercontent.com/daniel-pailanir/sdid/master") replace
    Last edited by Daniel PV; 27 Sep 2022, 07:27.

    Comment


    • #3
      Daniel PV Re-installing did the trick - thanks so much!

      Comment

      Working...
      X