View source: R/event_study_month.R
event_study_month | R Documentation |
event_study_month
returns a tibble ready for event study analysis in units of months.
event_study_month(data, year_min, year_max, window_length)
data |
an object/dataframe/tibble. |
year_min |
the column in the object that contains the universities. |
year_max |
the column in the object that contains the start date of the first moratorium. |
window_length |
the column in the object that contains the end date of the first moratorium. |
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_month(monthly_crime, 2014, 2019, 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.