kylebutts / did2s

Two-stage Difference-in-Differences package following Gardner (2021)
http://kylebutts.github.io/did2s
Other
96 stars 22 forks source link

Added Weights in Event Study #36

Closed vnery5 closed 2 weeks ago

vnery5 commented 2 weeks ago

Passed the weights argument to the underlying estimators in event_study.

Exception is Roth and Sant'Anna, which do not allow for weights.

kylebutts commented 2 weeks ago

Thanks for submitting a PR. Could you add a check at the top of the function with

if (!(is.null(weights) || is.character(weights))) {
  stop("Argument `weights` must be `NULL` or a character string")
}