From dd028d9bdbbe684543a42b48f09853c020aa44bc Mon Sep 17 00:00:00 2001 From: ekgolightly <68558720+ekgolightly@users.noreply.github.com> Date: Tue, 4 Jul 2023 13:05:51 -0400 Subject: [PATCH] Switch time_to_treat sub calc in Python logic --- Model_Estimation/Research_Design/event_study.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Model_Estimation/Research_Design/event_study.md b/Model_Estimation/Research_Design/event_study.md index c9553745..04886ee1 100644 --- a/Model_Estimation/Research_Design/event_study.md +++ b/Model_Estimation/Research_Design/event_study.md @@ -73,7 +73,7 @@ df = pd.read_csv("https://raw.githubusercontent.com/LOST-STATS/LOST-STATS.github # This allows for the interaction between `treat` and `time_to_treat` to occur for each state. # Otherwise, there may be some missingss and the estimations will be off. df['time_to_treat'] = ( - df['_nfd'].sub(df['year']) + df['year'].sub(df['_nfd']) # missing values for _nfd implies no treatment .fillna(0) # so we don't have decimals in our factor names