## Estimate group-time average treatment effects using att_gt method
example_attgt <- att_gt(yname = "Reports",
tname = "FY",
idname = "State_FIPS",
gname = "G",
#xformla = (need controls),
control_group = "notyettreated",
data = sample)
summary(example_attgt)
##
## Call:
## att_gt(yname = "Reports", tname = "FY", idname = "State_FIPS",
## gname = "G", data = sample, control_group = "notyettreated")
##
## Reference: Callaway, Brantly and Pedro H.C. Sant'Anna. "Difference-in-Differences with Multiple Time Periods." Journal of Econometrics, Vol. 225, No. 2, pp. 200-230, 2021. <https://doi.org/10.1016/j.jeconom.2020.12.001>, <https://arxiv.org/abs/1803.09015>
##
## Group-Time Average Treatment Effects:
## Group Time ATT(g,t) Std. Error [95% Simult. Conf. Band]
## 2006 2006 -1852.5000 1278.1884 -10866.514 7161.514
## 2006 2007 -3631.5000 1988.5402 -17655.042 10392.042
## 2006 2008 -4946.0000 7016.4150 -54427.016 44535.016
## 2006 2009 -2354.7500 1146.9781 -10443.445 5733.945
## 2006 2010 -4206.7500 1961.8534 -18042.092 9628.592
## 2006 2011 -8205.5000 6131.3015 -51444.537 35033.537
## 2006 2012 -3104.6667 2715.7978 -22256.960 16047.626
## 2006 2013 -3875.0000 NA NA NA
## 2006 2014 -2726.0000 NA NA NA
## 2006 2015 -3440.5000 NA NA NA
## 2006 2016 -5480.0000 NA NA NA
## 2006 2017 -6068.0000 NA NA NA
## 2006 2018 -6161.5000 NA NA NA
## 2006 2019 -4046.5000 NA NA NA
## 2006 2020 -1169.0000 NA NA NA
## 2012 2006 644.6667 1783.8999 -11935.715 13225.049
## 2012 2007 2932.0000 1050.1766 -4474.033 10338.033
## 2012 2008 18684.6667 844.2596 12730.797 24638.537 *
## 2012 2009 -20198.3333 174.2881 -21427.444 -18969.222 *
## 2012 2010 -4378.6667 1020.1951 -11573.265 2815.932
## 2012 2011 15124.3333 1658.2082 3430.352 26818.315 *
## 2012 2012 1049.6667 2280.4069 -15032.172 17131.505
## 2012 2013 -7511.0000 NA NA NA
## 2012 2014 -4993.0000 NA NA NA
## 2012 2015 -7780.5000 NA NA NA
## 2012 2016 -4873.0000 NA NA NA
## 2012 2017 225.0000 NA NA NA
## 2012 2018 -3293.5000 NA NA NA
## 2012 2019 -8738.5000 NA NA NA
## 2012 2020 -29436.0000 NA NA NA
## 2013 2006 4598.0000 1614.0596 -6784.638 15980.638
## 2013 2007 -3626.6667 1277.3442 -12634.727 5381.393
## 2013 2008 -8506.0000 5874.5642 -49934.480 32922.480
## 2013 2009 6497.6667 6683.7355 -40637.234 53632.567
## 2013 2010 -176.0000 1644.7001 -11774.720 11422.720
## 2013 2011 -567.6667 5702.7471 -40784.461 39649.128
## 2013 2012 -6921.5000 NA NA NA
## 2013 2013 -4633.5000 NA NA NA
## 2013 2014 -3223.5000 NA NA NA
## 2013 2015 -6735.0000 NA NA NA
## 2013 2016 -7740.5000 NA NA NA
## 2013 2017 -8538.5000 NA NA NA
## 2013 2018 -12796.0000 NA NA NA
## 2013 2019 -13234.0000 NA NA NA
## 2013 2020 -14691.5000 NA NA NA
## ---
## Signif. codes: `*' confidence band does not cover 0
##
## Control Group: Not Yet Treated, Anticipation Periods: 0
## Estimation Method: Doubly Robust
agg.simple <- aggte(example_attgt, type = "simple")
summary(agg.simple)
##
## Call:
## aggte(MP = example_attgt, type = "simple")
##
## Reference: Callaway, Brantly and Pedro H.C. Sant'Anna. "Difference-in-Differences with Multiple Time Periods." Journal of Econometrics, Vol. 225, No. 2, pp. 200-230, 2021. <https://doi.org/10.1016/j.jeconom.2020.12.001>, <https://arxiv.org/abs/1803.09015>
##
##
## ATT Std. Error [ 95% Conf. Int.]
## -6194.109 1363.983 -8867.466 -3520.753 *
##
##
## ---
## Signif. codes: `*' confidence band does not cover 0
##
## Control Group: Not Yet Treated, Anticipation Periods: 0
## Estimation Method: Doubly Robust
agg.es <- aggte(example_attgt, type = "dynamic")
summary(agg.es)
##
## Call:
## aggte(MP = example_attgt, type = "dynamic")
##
## Reference: Callaway, Brantly and Pedro H.C. Sant'Anna. "Difference-in-Differences with Multiple Time Periods." Journal of Econometrics, Vol. 225, No. 2, pp. 200-230, 2021. <https://doi.org/10.1016/j.jeconom.2020.12.001>, <https://arxiv.org/abs/1803.09015>
##
##
## Overall summary of ATT's based on event-study/dynamic aggregation:
## ATT Std. Error [ 95% Conf. Int.]
## -5933.856 1167.066 -8221.263 -3646.448 *
##
##
## Dynamic Effects:
## Event time Estimate Std. Error [95% Simult. Conf. Band]
## -7 4598.000 915.2598 2562.6808 6633.3192 *
## -6 -1491.000 2475.1220 -6995.0804 4013.0804
## -5 -2787.000 3748.5126 -11122.7970 5548.7970
## -4 12591.167 7858.9861 -4885.3418 30067.6751
## -3 -10187.167 7464.8610 -26787.2350 6412.9017
## -2 -2473.167 4180.4029 -11769.3845 6823.0511
## -1 4101.417 1658.2082 413.9575 7788.8758 *
## 0 -1812.111 2120.5193 -6527.6397 2903.4174
## 1 -4788.667 1676.8025 -8517.4751 -1059.8583 *
## 2 -5558.000 2671.6492 -11499.1099 383.1099
## 3 -5958.583 1806.8185 -9976.5162 -1940.6504 *
## 4 -5872.750 1513.0573 -9237.4282 -2508.0718 *
## 5 -6925.500 2809.5312 -13173.2265 -677.7735 *
## 6 -6544.056 3140.2750 -13527.2774 439.1663
## 7 -9101.667 2856.1508 -15453.0641 -2750.2693 *
## 8 -16081.000 18384.2675 -56963.2212 24801.2212
## 9 -3440.500 NA NA NA
## 10 -5480.000 1389.1983 -8569.2453 -2390.7547 *
## 11 -6068.000 NA NA NA
## 12 -6161.500 964.8034 -8306.9924 -4016.0076 *
## 13 -4046.500 110.0832 -4291.2988 -3801.7012 *
## 14 -1169.000 29.6520 -1234.9391 -1103.0609 *
## ---
## Signif. codes: `*' confidence band does not cover 0
##
## Control Group: Not Yet Treated, Anticipation Periods: 0
## Estimation Method: Doubly Robust
ggdid(example_attgt)
