Task container for panel (difference-in-differences style) event studies. This is designed for settings where units receive treatment at potentially different times, and we observe outcomes over multiple periods.
Methods
new(panel_data, unit_id, time_id, outcome, treatment, treatment_time)Create a new panel event study task.
print()Print summary.
Public fields
panel_dataThe panel dataset in long format.
unit_idName of the unit identifier column.
time_idName of the time identifier column.
outcomeName of the outcome column.
treatmentName of the treatment indicator column (0/1).
treatment_timeName of the treatment timing column (period when unit first treated; NA for never-treated).
resultsEstimation results (populated after estimation).
Methods
PanelEventStudyTask$new()
Create a new PanelEventStudyTask.
Usage
PanelEventStudyTask$new(
panel_data,
unit_id = "unit_id",
time_id = "time_id",
outcome = "outcome",
treatment = "treated",
treatment_time = "treatment_time"
)Arguments
panel_dataLong-format panel data frame.
unit_idName of the unit ID column.
time_idName of the time period column.
outcomeName of the outcome variable column.
treatmentName of the treatment indicator column (0/1).
treatment_timeName of column indicating when each unit is first treated (NA for never-treated controls).