xuyiqing / gsynth

Generalized Synthetic Control Method
Other
134 stars 41 forks source link

Calculation of cumulative treatment effects from cumuEff function #75

Open cjing1 opened 2 years ago

cjing1 commented 2 years ago

Thank you again for this amazing GSC R package. I am curious what formulas does the cumuEff function use to calculate cumulative treatment effects? My understanding of cumulative treatment effects (cumulative abnormal returns) is the sum of the average treatment effects by days (abnormal returns) during the defined period. However, using the turnout example, the cumulative treatment effects for periods (0,5) are:

Screen Shot 2022-01-16 at 5 59 18 PM

And the average treatment effect on the treated (ATT) by period 0 to 5 are:

Screen Shot 2022-01-16 at 6 00 32 PM

The est.att at period 0 is the same as est.catt at period 0. But the est.catt at period 1 is not exactly the sum of est.att at period 0 and period 1. And the difference is larger as the period range increases. (The est.att at period 5 is 17.0129655, the sum of est.att from period 0 to 5 is 18.18623). Hope I am not misunderstood something.

May I ask what formula is used to calculate the cumulative treatment effects? Thank you so much.

groverpr commented 1 year ago

+1. @xuyiqing

In the following code cumsum(cumu00$catt) is not equal to cumu0$catt. I assumed that they would give same results.

names(turnout)

out0 <- gsynth(turnout ~ policy_edr + policy_mail_in + policy_motor, 
               data = turnout, index = c("abb","year"), 
               min.T0=5,
               se = TRUE, inference = "parametric", 
               r = 0, CV = FALSE, force = "two-way", 
               nboots = 1000, seed = 02139)

cumu0 <- cumuEff(out0, cumu = TRUE, id = NULL) 
cumu00 <- cumuEff(out0, cumu = FALSE, id = NULL)

Results

> cumsum(cumu00$catt)
 [1] -3.6180842 -5.2432626 -5.9326234 -6.8398319 -8.6963505 -9.2683161 -5.8784927  0.5408174  7.9921690 12.1224685 17.8825955
> cumu0$catt
[1] -3.618084 -5.243263 -6.081260 -7.268438 -9.116660 -9.916146 -9.315799 -6.926561 -3.555331 -1.526081  1.628434
>