Announcement

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

  • How to fix when option is not allowed?

    Hi, I am currently using Stata/SE15.1 and trying to use did_multiplegt package to estimate two-way fixed effect model.
    To see how the package works, I simply tried the following codes as in the help file.

    ssc install bcuse

    bcuse wagepan

    did_multiplegt lwage nr year union, robust_dynamic dynamic(1) placebo(1) breps(50) cluster(nr)


    But I got the error message: option robust_dynamic not allowed

    Is there anyway to fix this problem?


  • #2
    It worked for me. I think you have somehow read the help file from the most recent release on SSC - in which the robust_dynamic option is new - but have an earlier release installed. Does the example appear in the output of help did_multiplegt run on the system where the command failed?

    In any event, try
    Code:
    ado update did_multiplegt
    to initial the update process for the pacage. If that doesn't work or doesn't solve your problem, I'd suggest
    Code:
    ado uninstall did_multiplegt
    ssc install did_multiplegt

    Comment


    • #3
      Yes, it appear in the output of help run on the same system the command failed.
      I updated as you suggested, but still I got the same message that option robust_dynamic not allowed.


      Code:
       ado uninstall did_multiplegt
      package did_multiplegt from http://fmwww.bc.edu/RePEc/bocode/d
      'DID_MULTIPLEGT': module to estimate sharp Difference-in-Difference designs with multiple groups and periods

      (package uninstalled)

      Code:
      ssc install did_multiplegt
      checking did_multiplegt consistency and verifying not already installed...
      installing into /Users/josephjung/Library/Application Support/Stata/ado/plus/...
      installation complete.

      Code:
      did_multiplegt lwage nr year union, robust_dynamic dynamic(1) placebo(1) breps(50) cluster(nr)
      option robust_dynamic not allowed
      r(198);

      In addition, the following code gives me an error message:
      Code:
      ado update did_multiplegt
      invalid syntax
      r(198);


      Do I miss something here? Thanks so much for your reply.
      Last edited by Chul-Kyoo Jung; 26 Mar 2021, 05:55.

      Comment


      • #4
        The failure of the ado update command is concerning. It suggests a problem with your installation of Stata.

        Is it possible that there is a did_multiplegt.ado lurking somewhere else on your system? On my Mac
        Code:
        . ssc install did_multiplegt
        checking did_multiplegt consistency and verifying not already installed...
        installing into /Users/lisowskiw/Library/Application Support/Stata/ado/plus/...
        installation complete.
        
        . which did_multiplegt
        /Users/lisowskiw/Library/Application Support/Stata/ado/plus/d/did_multiplegt.ado
        
        . ado update did_multiplegt
        (note: ado update updates community-contributed files; type -update- to check for updates to
               official Stata)
        
        Checking status of specified packages...
        
           [23] did_multiplegt at http://fmwww.bc.edu/repec/bocode/d:
                installed package is up to date
        
        (no packages require updating)
        Try the which command as I did and confirm that the location Stata is finding is indeed the location it was installed into.

        Comment


        • #5
          Thanks again, I got the following:

          Code:
          . ssc install did_multiplegt
          checking did_multiplegt consistency and verifying not already installed...
          all files already exist and are up to date.
          
          . which did_multiplegt
          /Users/joseph/Library/Application Support/Stata/ado/plus/did_multiplegt.ado
          
          . ado update did_multiplegt
          invalid syntax
          r(198);
          My hunch is that recently I downloaded Stata11 parmest, which is not available on my SE15.1 version as in the guideline https://www.statalist.org/forums/for...parmest-on-ssc
          This seems to cause all the issues with ado update.

          Weird thing is that I ran the did_multiplegt on Windows10 and everything works well with the option "robust_dynamic", but still ado update is not working here (this one was also downloaded with Stata11 parmest.
          So based on the Windows10 Stata outcome, MacOS should work for the option "robust_dynamic" but ado update. I was wondering if there could be a way to fix this issue
          Last edited by Chul-Kyoo Jung; 26 Mar 2021, 07:33.

          Comment


          • #6
            In versions of Stata before version 16 the ado update command was adoupdate. My apologies for the misdirection - you told us you're on version 15.1 but I had no memory that the command had changed subtly in version 16.

            Note the following from post #5 of your installation
            Code:
            . which did_multiplegt
            /Users/joseph/Library/Application Support/Stata/ado/plus/did_multiplegt.ado
            and the following from post #4 of my installation
            Code:
            . which did_multiplegt
            /Users/lisowskiw/Library/Application Support/Stata/ado/plus/d/did_multiplegt.ado
            Your installation was not made into the "d" subdirectory of the plus directory, or else it was installed correctly but there is an outdated version in the plus directory that was not tracked by Stata and thus not removed, and that is what is being run. I don't have the inclination at the moment to dig into how Stata treats the ADOPATH and subdirectories within it.

            I think if in the macOS Finder you do Go > Go to Folder... and tell it to go to
            Code:
            /Users/joseph/Library/Application Support/Stata/ado/plus
            you will find the old copy of did_multiplegt.ado in that directory, and the new copy in the "d" subdirectory.

            I hope there is not a lot of other old stuff in the plus directory, because that would suggest, to me, a serious problem that you should post to a new topic with a title likely to catch the attention of folk who can advise, or else, contact Stata Technical Services for assistance.

            Otherwise, drag the old copy of did_multiplegt.ado to the Trash, empty the Trash, relaunch Stata, and try the which command again.

            Comment


            • #7
              Thanks a lot, it is fixed now! I am simply amazed and so grateful.
              Can I have just one more question. My ultimate goal is to draw a graph like the following:
              Click image for larger version

Name:	Screen Shot 2021-03-26 at 11.31.53 AM.png
Views:	2
Size:	19.3 KB
ID:	1599952



              But in fact, the following
              Code:
              did_multiplegt lwage nr year union, robust_dynamic dynamic(1) placebo(1) breps(50) cluster(nr)
              generates:

              When dynamic effects and first-difference placebos are requested, the command does
              not produce a graph, because placebos estimators are DIDs across consecutive time periods,
              while dynamic effects estimators are long-difference DIDs, so they are not really comparable.
              What kind of modification should be done on the code to show the dynamic treatment effects as above picture?
              I hope this does not bother you much.

              Comment


              • #8
                I regret to say that I know absolutely nothing about the did_multiplegt package. My contribution here was to apply my general knowledge of Stata programs to look at the code in did_multiplegt.ado and determine that the wrong version of the software was being invoked. And then to compare your output of where to mine to determine that an outdated version was overriding the later version.

                I suggest you post your new question about using did_multiplegt as a new Statalist topic with a title designed to attract people familiar with the did_multiplegt package.

                Comment


                • #9
                  Thanks, William for all your helps and contributions.

                  Comment


                  • #10
                    Hello Chul-Kyoo,
                    you might want to look into the event_plot command created by Borusyak (2021). He originally created it to plot his own imputation estimator but it also supports csdid, eventstudyinteract and didmultiplegt, which constitutes a great way to compare different estimators.

                    Comment

                    Working...
                    X