Difference-in-differences estimates of ATT(g,t), given a group g and time period t.
Source:R/attgt_functions.R
did_attgt.Rd
Takes a "local" data.frame and computes an estimate of a group time average treatment effect and a corresponding influence function using a difference in differences approach.
The code relies on gt_data
having certain variables defined.
In particular, there should be an id
column (individual identifier),
D
(treated group identifier), period
(time period), name
(equal to "pre" for pre-treatment periods and equal to "post" for post
treatment periods), Y
(outcome).
In our case, we call two_by_two_subset
which sets up the
data to have this format before the call to did_attgt
.