View source: R/event_study_week.R
event_study_week | R Documentation |
event_study_week
returns a tibble ready for event study analysis in units of weeks
event_study_week(data, window_length, reference_week)
data |
an object/dataframe/tibble. |
window_length |
the column in the object that contains the end date of the first moratorium. |
reference_week |
a number for which year you want to be the reference year. It will be paste0("treatment_minus_", reference_year) |
This function creates the event study tibble needed to do analysis in event study framework. Moreover, the month prior to treatment is the reference month (e.g. set to zero), and all months with any amount of treatment are considered a treated month (e.g. 2 weeks in March = full month of March treated).
event_study_week(weekly_panel, 4, 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.