Announcement

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

  • honestdid plot does not work!

    Hello all,

    I am trying to run an ``honestdid" command in Stata18/SE. The problem is that when I run the command, I am giving the error: "__00000A: invalid syntax in ci()". However, I can see the results text, but the plot does not appear and I get that error.

    Has anyone had this problem before?!

  • #2
    Reproducible example please.

    Comment


    • #3
      Hello Jared,

      I get the same error in both examples, one from the GitHub repo and the other mentioned in the help file. I even put
      Code:
       ci(95)
      at the end of honestdid command, but it did not work.

      repo example: https://github.com/mcaceresb/stata-honestdid#honestdid
      Code:
      local mixtape https://raw.githubusercontent.com/Mixtape-Sessions
      use `mixtape'/Advanced-DID/main/Exercises/Data/ehec_data.dta, clear
      l in 1/5
      * Keep years before 2016. Drop the 2016 cohort
      keep if (year < 2016) & (missing(yexp2) | (yexp2 != 2015))
      * Create a treatment dummy
      gen byte D = (yexp2 == 2014)
      gen `:type year' Dyear = cond(D, year, 2013)
      * Run the TWFE spec
      reghdfe dins b2013.Dyear, absorb(stfips year) cluster(stfips) noconstant
      local plotopts ytitle("Estimate and 95% Conf. Int.") title("Effect on dins")
      coefplot, vertical yline(0) ciopts(recast(rcap)) xlabel(,angle(45)) `plotopts'
      honestdid, pre(1/5) post(7/8) mvec(0.5(0.5)2)
      honestdid, coefplot cached
      help file example:
      Code:
      use LWdata_RawData.dta, clear
      mata stata(_honestExampleLWCall())
      honestdid, pre(1/9) post(10/32) coefplot

      The error I get in both repo and help file example:
      Click image for larger version

Name:	Screenshot 2024-07-03 061529.png
Views:	1
Size:	3.9 KB
ID:	1757684

      Last edited by Ali Bahrami Sani; 02 Jul 2024, 22:36.

      Comment


      • #4
        Your code (from the help-file) works fine in StataNow/SE 18.5.

        Comment


        • #5
          I also tried on StataNow18.5/SE. I don't know why, but it doesn't work on my system. I tried many coding combinations, many ways including updating packages and software. None of them worked!
          Last edited by Ali Bahrami Sani; 03 Jul 2024, 08:22.

          Comment


          • #6
            I also got the same error. However, it has gone away after doing this:

            Code:
            ssc install coefplot, replace
            Could you also try updating your coefplot installation?

            For reference, my new version of coefplot is:

            Code:
            *! version 1.8.6  22feb2023  Ben Jann
            Last edited by Hemanshu Kumar; 03 Jul 2024, 08:48.

            Comment


            • #7
              Thank you Hemanshu.

              Yes. It was the "coefplot". It works now!

              Comment

              Working...
              X