kylebutts / didimputation

Difference-in-differences Imputation-based Estimator proposed by Borusyak, Jaravel, and Spiess (2021)
Other
46 stars 13 forks source link

Data Table Error in Event Study #17

Closed vedant-vohra closed 9 months ago

vedant-vohra commented 9 months ago

I'm runninng the following code:


devtools::install_github("kylebutts/didimputation")

library(didimputation)
library(fixest)
library(ggplot2)

# Load Data from did2s package
data("df_het", package = "didimputation")
setDT(df_het)

es <- did_imputation(
  data = df_het, yname = "dep_var", gname = "g",
  tname = "year", idname = "unit",
  # event-study
  horizon = TRUE, pretrends = -5:-1
)

The error I get is:

Error in `[.data.table`(data, , `:=`(paste0("zz000wtr", e), ifelse(is.na(zz000event_time),  : 
  unused argument (env = list(e = e))
kylebutts commented 9 months ago

update to the data.table dev version!