dat <- sim_binary_panel(n = 500, nperiods = 4, prop_treated = 0.5)
dat2 <- dat[dat$period %in% c(2, 3), ]
res <- binary_did_logit(dat2, yname = "y", tname = "period",
idname = "id", treat_period = 3,
control_period = 2, gname = "g")
print(res)
Run the code above in your browser using DataLab