Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Goodman-Bacon Decomposition #1232

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Goodman-Bacon Decomposition #1232

wants to merge 6 commits into from

Conversation

arutyunovv
Copy link

Hi @valerievossen, @srosh2000, and @alexandervossen,

I hope you've all had a great weekend!

I am opening a pull request for my topic on the Goodman-Bacon decomposition. I also went into some detail on why the TWFE estimator may fail in settings with staggered treatment timing, so it could be worthwhile to change the title of the article to reflect that.

Please let me know what improvements you think could be made and also what you think about the title issue. Thank you!

Best,
Victor

Copy link

netlify bot commented Jul 28, 2024

Deploy Preview for unique-scone-f4eb67 ready!

Name Link
🔨 Latest commit bda6bcd
🔍 Latest deploy log https://app.netlify.com/sites/unique-scone-f4eb67/deploys/66c2d9b26c3ed0000832e860
😎 Deploy Preview https://deploy-preview-1232--unique-scone-f4eb67.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@shrabasteebanerjee
Copy link
Contributor

shrabasteebanerjee commented Jul 29, 2024

Hi @arutyunovv nice job! I haven't done a detailed review but I believe we have some articles about why TWFE may fail in staggered settings, @srosh2000 or @valerievossen maybe you can point out some relevant ones for Victor to cross reference?

@valerievossen
Copy link
Contributor

Hi @arutyunovv,

It reads super clear! I added only a few small comments.

  • I fixed one codeblock tag as it wasn't rendering for me yet.

  • For a title, I thought of: "Uncovering TWFE Bias for Staggered DiD with the Goodman-Bacon Decomposition" What do you think?

  • About @shrabasteebanerjee's comment, I think this is mostly the Staggered DiD topic, as far as I could find. You could maybe add an extra sentence to the first tipbox referring to this. Something in the direction of: "And, refer to the Staggered-DiD article for a discussion on common issues of the classic TWFE DiD approach."

  • And, you might want to change the weight of the article (also as other DiD topics have been merged now!

@arutyunovv
Copy link
Author

Hi @valerievossen and @shrabasteebanerjee,

Thanks a lot for your comments!

  • We have some articles on TWFE in general and, as Valerie says, one of them (Roshini's article on staggered DiD) very briefly discusses why they fail. She focuses more on the solution (Callaway and Sant'Anna in this case), while I focus on why TWFE can fail and how we can detect these failures. Therefore I think the two complement each other very well - I'll review mine to see where more references to Roshini's article can be added and once she is back we could also maybe incorporate some references to my article in hers.
  • I like the title suggestion, it reflects the article's content much more accurately. Unless it's a little too long?
  • And yes, I will change the weight!

@valerievossen
Copy link
Contributor

@arutyunovv I was thinking the same, could be a bit shorter. What about "Uncovering Staggered DiD Bias with the Goodman-Bacon Decomposition"?

@arutyunovv arutyunovv linked an issue Jul 30, 2024 that may be closed by this pull request
Copy link

@srosh2000 srosh2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job @arutyunovv! Added some minor suggestions but otherwise its good to go! :)

{{<katex>}}
{{</katex>}}

The problem with negative weights is that they can bias our final estimate by altering the direction (sign) of the effect. Let’s suppose we have three comparisons with coefficients of 0.5, 1, and 5 and weights of 0.8, 0.8, and –0.6, respectively. Our total effect is then: $0.5*0.8 + 1*0.8 + 5*(-0.6) = -1.8$. We therefore obtain a negative treatment effect estimate even though each of the individual comparisons yields a positive effect of the treatment!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the total effect equation is not rendering properly when locally hosted for some reason..


The decomposition also allows us to see the weight attached to each type of comparison. This way, we are able to see how our overall TWFE estimate is constructed and whether it is prone to the limitations and biases discussed above. In practice, computing the Goodman-Bacon decomposition is very straightforward with the `bacondecomp` [package](https://github.com/evanjflack/bacondecomp) in R.

## An example in R

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We discussed earlier about keeping the example consistent throughout the article so that people can connect the code to the intuition but if you feel like the divorce dataset is not straightforward to explain the intuition then lets keep it as is. Either is fine by me :)


The Goodman-Bacon decomposition is a diagnostic tool which allows us to see whether our TWFE estimator is reliant on forbidden comparisons or negative weights. The decomposition breaks down the estimator into three types of comparisons:

1. Treated vs. never treated: this is equivalent to the classic 2x2 DiD comparison. We are only comparing treated to untreated units.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very minor: Good to render the bullet headers (e.g. treated vs never treated) in bold or italics

@arutyunovv
Copy link
Author

Hi @srosh2000,

Thanks for your comments! I've now made the changes you suggested - let me know whether you think there is anything else to change still.

@shrabasteebanerjee I'm also tagging you so that you can have a final look before merging. Thanks!

Best,
Victor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Goodman-Bacon decomposition
4 participants