event_study_week: Creates the Event Study tibble for Analysis-Weekly Data.

View source: R/event_study_week.R

event_study_weekR Documentation

Creates the Event Study tibble for Analysis-Weekly Data.

Description

event_study_week returns a tibble ready for event study analysis in units of weeks

Usage

event_study_week(data, window_length, reference_week)

Arguments

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)

Details

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).

Examples

event_study_week(weekly_panel,  4, 1)


michaeltopper1/ifc documentation built on Jan. 30, 2023, 10:08 a.m.