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

Add support for package "did" #870

Open
baarthur opened this issue May 1, 2024 · 2 comments
Open

Add support for package "did" #870

baarthur opened this issue May 1, 2024 · 2 comments
Labels
reprex 📊 We need a reproducible example for further investigation

Comments

@baarthur
Copy link

baarthur commented May 1, 2024

Hi there,

I'd like to request support for models of class "MP" and "AGGTEobj" generated by the [did](https://github.com/bcallaway11/did/) functions att_gt() and aggte().

My main motivation is that I want modelsummary to print stars for these objects (related thread).

p-values are not readily available, instead, did uses a custom bootstrap procedure to calculate simultaneous confidence intervals for multiple periods and print stars for the selected confidence level.

Would that be possible?

@strengejacke
Copy link
Member

Do you have a reproducible example of a "model", and its output?

@strengejacke strengejacke added the reprex 📊 We need a reproducible example for further investigation label May 2, 2024
@baarthur
Copy link
Author

baarthur commented May 3, 2024

hi @strengejacke, here it is:

library(did)


data("mpdta")

# compute group-time average treatment effects
att <- att_gt(yname = "lemp", tname = "year", idname = "countyreal", gname = "first.treat", data = mpdta)

# some aggregation schemes
## overall parameter per treatment cohort
aggte(att)

## by length of exposure (event-study)
es <- aggte(att, type = "dynamic", balance_e = 1)
es

## both MP and AGGTEObj can be ggploted:
ggdid(att)
ggdid(es)

att_gt() produces a MP object, with group-time average treatment effect parameters: one for each treatment group g and period t.

then, they can be aggregated in various forms using aggte(), rendering an AGGTEObj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reprex 📊 We need a reproducible example for further investigation
Projects
None yet
Development

No branches or pull requests

2 participants