xuyiqing / gsynth

Generalized Synthetic Control Method
Other
131 stars 40 forks source link

cumuEff and option "period" #42

Open sailmichael opened 4 years ago

sailmichael commented 4 years ago

I am using version 1.16 of gsynth and a monthly panel that includes 48 periods (with gaps). I was trying to calculate the average treatment effect for a sub-group with cumuEff. Initially, I used cumuEff with period = c(0,12) but without the id option, expecting to get the average treatment effect for all groups, but limited to 12 post-treatment periods. However, what I noticed was that instead of periods 0 to 12 I got the ATT for periods -4 to 8. Trying different dependent variables, I found that sometimes I would get the correct period 0 to 12, but other times also larger offsets (e.g., -10 to 2). Where are these offsets coming from? I am sure I overlooked something.

out <- gsynth(Y ~ D, data = data_collapsed, EM = TRUE, index = c("groups","month"), force = "two-way", CV = TRUE, r = c(0, 5), se = TRUE, inference = "parametric", nboots = 1000, parallel = FALSE, min.T0 = 6, cl = "city")

cumu2 <- cumuEff(out, cumu = FALSE, period = c(0,12))