mdd_DD_simple | R Documentation |
Standard two-way FE estimation of a DiD
mdd_DD_simple(mdd_dat, weights = NULL, cluster = NULL)
mdd_dat |
An object of class mdd_dat created by |
weights |
Weight argument passed to the underlying |
cluster |
Cluster argument passed to the underlying |
mdd_event_study
for the event study.
## simulate and format data
DID_dat_raw <- sim_dat_common(timing_treatment = 5:10)
DID_dat <- mdd_data_format(DID_dat_raw)
## Estimate DiD
mdd_DD_simple(DID_dat)
## estimate with weights
# add random unit-year specific weights:
DID_dat$wght <- runif(nrow(DID_dat))
mdd_DD_simple(DID_dat, weights=~wght)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.