insight icon indicating copy to clipboard operation
insight copied to clipboard

Add support for package "did"

Open baarthur opened this issue 1 year ago • 2 comments

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?

baarthur avatar May 01 '24 13:05 baarthur

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

strengejacke avatar May 02 '24 06:05 strengejacke

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

baarthur avatar May 03 '24 14:05 baarthur