keep_all_pretreatment_subset: keep_all_pretreatment_subset

View source: R/subset_functions.R

keep_all_pretreatment_subsetR Documentation

keep_all_pretreatment_subset

Description

A function that takes an original data set and keeps all data for all groups that are not-yet-treated by period tp as well as for group g.

In particular, this keeps more data than functions like two_by_two subset that use a fixed base period.

A main use case for this function is the interactive fixed effects approach proposed in Callaway and Tsyawo (2023).

Usage

keep_all_pretreatment_subset(data, g, tp, ...)

Arguments

data

a data frame

g

group

tp

time period

Value

all data but in correct format for computing ATT(g,t)


bcallaway11/pte documentation built on June 6, 2024, 1:41 p.m.