Announcement

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

  • graph for the dynamic treatment effect using did_multiplegt package

    Hi, I am trying to draw a graph like the following using did_multiplegt package:
    Click image for larger version

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




    But in fact, the following code
    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.
    I was wondering if there's a way to modify the code in order to show the dynamic treatment effects as above picture. Or is there any alternative way to draw the graph?

    Thanks.
    Last edited by Chul-Kyoo Jung; 26 Mar 2021, 10:32.

  • #2
    Dear Chul-Kyoo Jung,

    Although you may have already found an answer, many people try out the alternatives to TWFE estimations now, so an answer is useful. As did_mutliplegt is a user-written command in progress, the help documentation of this command has been extended since March 2021 and new functionalities have been added.

    De CD estimator is able to calculate two types of placebo estimators (t<-1 in your graph). The default of did_multiplegt uses first-differences between two adjacent time periods respective to the event time, whereas the option -longdiff_placebo- calculates the (l)th placebo estimator by assessing the pre-event DID over (l+1) periods. Note, the dynamic (so t>0) effects are also long differences, so using long difference placebo's you are comparing apples with apples and the command allows for a graph to be shown.

    For a discussion regarding which placebo estimators to use for which persons see the "Difference-in-Differences Estimators of Intertemporal Treatment Effects" by CD (reference can be found in -help did_multiplegt-).

    For any updates regarding this command, checking the twitter account of the author (@CdeChaisemartin) may be useful.


    Kind regards,

    Joop

    Comment


    • #3
      Dear Chul-Kyoo Jung,

      the command will return a graph in this case if you add the option -longdiff_placebo-. You code should be like this:

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

      kind regards,
      Vanessa

      Comment


      • #4
        How to save the graph using did_multiplegt in a loop. I am successful in saving the outcome but not the graphs. Please suggest
        graph save or export is not working.

        Comment


        • #5
          You can look here for code suggestions:

          https://asjadnaqvi.github.io/DiD/doc...id_multiplegt/

          Comment


          • #6
            Thanks, Asjad!!!

            Comment

            Working...
            X