Announcement

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

  • Obtaining main results after jwdid

    Hello, I have just started to use jwdid command, however, I cannot see the effect on main coefficients as the output list is too long. How can I retrieve the main coefficients? Please see the attachment
    Click image for larger version

Name:	example.png
Views:	1
Size:	39.0 KB
ID:	1683326



  • #2
    Please do not post attachments. They don't help anyone. Why not just post your actual results in the
    Code:
    Code delimiter
    ? Please, I beseech you, no screenshots. I'm on my phone and I can't even make much of this out.

    Anyways. Run whatever your syntax was again and then type
    Code:
    ereturn list all
    And post back what you get (not in a screenshot, not in a picture, in the
    Code:
     code
    delimiters.

    Comment


    • #3
      For aggregated effects type estat simple
      estat event
      or
      estat calendar

      Comment


      • #4
        Yeah, I actually did that now. The results are very different from my main analyses and from did_multiplegt. This is because of unbalanced panel data structure?

        Comment


        • #5
          It could be just different because of the underlying assumptions, use of controls, etc.
          Unfortunately, even tho the new methods often coincide (with clean data), they also provide very different results when data is less clean,
          I think Asjad has some examples of that on his repository
          https://asjadnaqvi.github.io/DiD/
          bottom line. different estimator may give you different estimates, its up to you to justify which one is better based on your data, and treatment structure

          Comment


          • #6
            I finally had time to look at jwdid and, using both Fernando’s data set and one of my own, I was able to reproduce the results in the linear case. With one exception: the jwdid standard errors don’t account for the sampling variation in the covariates. This makes some difference in Fernando’s generated data. You can find my shared Dropbox in a pinned tweet on Twitter where I show how to use the vce(unconditional) option. I always arrange the regression so the main effects are first.

            I haven’t tried the estat simple option and so on. A nice feature! Do I understand that these impose restrictions on the general model? Or aggregates the effects? I’m not sure seeing simpler output is a good reason to do that.

            Also, as I discuss in my paper, POLS and TWFE are no longer the same with unbalanced panels. The latter is preferred in such cases. JW

            Comment


            • #7
              Dear Prof Wooldridge
              Thank you for pointing that out. I think that accounting for sampling variation will be "simple" as i just need to add vce(unconditional) on my margins statement. I ll update that.
              Also, i have worked a bit further for a better implementation of the model with unbalanced panel , and repeated crossection that I should post.
              Please let me know if there is anything else I may be missing on the implementation.
              F

              Comment


              • #8
                It's nice stuff. I'll just verify that I can reproduce the exponential model/Poisson output.

                Comment


                • #9
                  Hello everyone. Thanks for your contributions both proposing the estimates and creating a simple way to implement it.
                  I'm using jwdid along with csdid and did_multiplegt for my phd dissertation.

                  I would like to create some event-study type graphs with it using Stata 14.

                  I have tried some of the main solutions: event_plot, coefplot, but to no avail. I'm afraid the main reason is that Stata won't store the event estimates as estimates but as a Matrix.

                  Has anyone tried to make some nice graphs with the event estimates?


                  Code:
                  jwdid `x', ivar(id) tvar(year) gvar(group) group
                  estat event
                  return list
                  estadd matrix event = r(table)
                  estimates replay event
                  
                  
                  "estimation result event not found
                  r(111);"
                  
                  
                  
                  
                  
                  Example for CSDID
                  
                  Option 1:
                  
                  csdid `x', ivar(id) time(ano) gvar(group) notyet
                  estat event, window(-10 10) estore(cs) 
                  event_plot cs, default_look graph_opt(xtitle("Years of Policy") ytitle("ATE") ///
                      title("`x'") xlabel(-10(1)10)) stub_lag(Tp#) stub_lead(Tm#) together
                  
                  
                  Option 2:
                  
                  csdid `x', ivar(id) time(year) gvar(group) notyet
                  estat event
                  csdid_plot,  title("`x' ano")
                  Thanks much for any help.

                  Comment


                  • #10
                    Hi Bruno,
                    I think one of the ways you can try to get the results as you want is by doing the following
                    estat event, vce(unconditional) post est sto event This should "save" the outcome in memory as "event" (is similar to using the "cs" in estore(cs))
                    HTH

                    Comment


                    • #11
                      Hi
                      thanks for quick answer. The code you suggest don't really work but I've managed to save the results as below:

                      Code:
                      jwdid `x', ivar(id) tvar(year) gvar(group) group
                      eststo coef:estat simple
                      eststo event: estat event
                      Still cannot graph them, though.
                      Thanks for the help!
                      Last edited by Bruno pantaleao; 13 Jan 2023, 12:07.

                      Comment


                      • #12
                        Yeah I see now. the names of my columns are not standard with the output that event_plot needs.
                        One option you can use, however.
                        Store the r(table) outcome, and create your figures from that table.

                        Comment


                        • #13
                          Dear Fernando,

                          Much like Bruno, I am also using various DD estimators including jwdid. I also wish to produce and store the event-study aggregations:

                          Code:
                          jwdid `v', ivar(ID) tvar(YEAR) gvar(treatyear_`k') cluster(cluster) never level(99)
                          estat event
                          estore(jw_`v'_`k') level(99)
                          Yet after the individual ATT(g,t) coefficients have been estimated and my loop commands for estat event, I get the error "varlist required". What is going on?

                          Thank you in advance!

                          ALSO: I very recently came across the wooldid program published by Thomal Hegland. It seems to me that wooldid and jwdid are practically the same, or am I mistaken? If so, what is the difference between the two programs?

                          Comment


                          • #14
                            Hi Guy
                            first, pleast update jwdid to the latest version.
                            if after that the problem persists, let me know.
                            Second, WoolDID is just another way to implement the estimator. Thomal simply took a different approach to mine to implement it. Not sure why would differences arise.
                            F

                            Comment


                            • #15
                              Dear Fernando,

                              Thank you for the reply. I was curious about jwdid and wooldid in the case that there are any differences between them besides the manner of implementation. I have updated jwdid, but I continue to get the same error. For information, I am using Stata16.

                              Guy

                              Comment

                              Working...
                              X