Information
In the subsequent sample code, the dataframe df
I use contains the following variables:
Not all variables are required for each estimator.
Variable | Description |
---|---|
id |
A variable indicating the units/individual an observation belongs to in our data.* *For repeated cross-section, the |
time |
A variable indicating time-periods in our study for each observation. |
outcome |
Outcome variable for each observation. |
treat |
Treatment variable for each observation. Should equal 1 for treated units and 0 for untreated units. |
rel.time |
A relative time variable that indicates for the given period \(t\) of an observation, how many time-periods away did the unit \(i\) first get the treatment. For example, if unit \(i\) is treated in 2005, and the observation \(it\) is from 2003, the relative time would be -2.** This means ** A common question is regarding never-treated units. Generally, we do not set |
group |
Variable specifying if a unit is part of the treatment group or never-treated (control group). For units never receiving treatment, they get value 0, and for units that do end up receiving treatment sometime within the study, they get value 1. This is different from |
covar |
(optional) covariate(s) to condition for parallel trends. |