A function to take group-time average treatment effects and aggregate them into a smaller number of parameters. There are several possible aggregations including "simple", "dynamic", "group", and "calendar."

aggte(
  MP,
  type = "group",
  balance_e = NULL,
  min_e = -Inf,
  max_e = Inf,
  na.rm = FALSE,
  bstrap = NULL,
  biters = NULL,
  cband = NULL,
  alp = NULL,
  clustervars = NULL
)

Arguments

MP

an MP object (i.e., the results of the att_gt() method)

type

Which type of aggregated treatment effect parameter to compute. One option is "simple" (this just computes a weighted average of all group-time average treatment effects with weights proportional to group size). Other options are "dynamic" (this computes average effects across different lengths of exposure to the treatment and is similar to an "event study"; here the overall effect averages the effect of the treatment across all positive lengths of exposure); "group" (this is the default option and computes average treatment effects across different groups; here the overall effect averages the effect across different groups); and "calendar" (this computes average treatment effects across different time periods; here the overall effect averages the effect across each time period).

balance_e

If set (and if one computes dynamic effects), it balances the sample with respect to event time. For example, if balance.e=2, aggte will drop groups that are not exposed to treatment for at least three periods. (the initial period when e=0 as well as the next two periods when e=1 and the e=2). This ensures that the composition of groups does not change when event time changes.

min_e

For event studies, this is the smallest event time to compute dynamic effects for. By default, min_e = -Inf so that effects at all lengths of exposure are computed.

max_e

For event studies, this is the largest event time to compute dynamic effects for. By default, max_e = Inf so that effects at all lengths of exposure are computed.

na.rm

Logical value if we are to remove missing Values from analyses. Defaults is FALSE.

bstrap

Boolean for whether or not to compute standard errors using the multiplier boostrap. If standard errors are clustered, then one must set bstrap=TRUE. Default is value set in the MP object. If bstrap is FALSE, then analytical standard errors are reported.

biters

The number of boostrap iterations to use. The default is the value set in the MP object, and this is only applicable if bstrap=TRUE.

cband

Boolean for whether or not to compute a uniform confidence band that covers all of the group-time average treatment effects with fixed probability 1-alp. In order to compute uniform confidence bands, bstrap must also be set to TRUE. The default is the value set in the MP object

alp

the significance level, default is value set in the MP object.

clustervars

A vector of variables to cluster on. At most, there can be two variables (otherwise will throw an error) and one of these must be the same as idname which allows for clustering at the individual level. Default is the variables set in the MP object

Value

An AGGTEobj object that holds the results from the aggregation

Examples

Initial ATT(g,t) estimates from att_gt()

data(mpdta)
out <- att_gt(yname="lemp",
               tname="year",
               idname="countyreal",
               gname="first.treat",
               xformla=NULL,
               data=mpdta)

You can aggregate the ATT(g,t) in many ways.

Overall ATT:

aggte(out, type = "simple")
#> 
#> Call:
#> aggte(MP = out, type = "simple")
#> 
#> Reference: Callaway, Brantly and Pedro H.C. Sant'Anna.  "Difference-in-Differences with Multiple Time Periods." Forthcoming at the Journal of Econometrics <https://arxiv.org/abs/1803.09015>, 2020. 
#> 
#> 
#>    ATT    Std. Error     [ 95%  Conf. Int.]  
#>  -0.04         0.013    -0.0655     -0.0144 *
#> 
#> 
#> ---
#> Signif. codes: `*' confidence band does not cover 0
#> 
#> Control Group:  Never Treated,  Anticipation Periods:  0
#> Estimation Method:  Doubly Robust

Dynamic ATT (Event-Study):

aggte(out, type = "dynamic")
#> 
#> Call:
#> aggte(MP = out, type = "dynamic")
#> 
#> Reference: Callaway, Brantly and Pedro H.C. Sant'Anna.  "Difference-in-Differences with Multiple Time Periods." Forthcoming at the Journal of Econometrics <https://arxiv.org/abs/1803.09015>, 2020. 
#> 
#> 
#> Overall summary of ATT’s based on event-study/dynamic aggregation:  
#>      ATT    Std. Error     [ 95%  Conf. Int.]  
#>  -0.0772        0.0205    -0.1174     -0.0371 *
#> 
#> 
#> Dynamic Effects:
#>  Event time Estimate Std. Error [95% Simult.  Conf. Band]  
#>          -3   0.0305     0.0154       -0.0084      0.0694  
#>          -2  -0.0006     0.0134       -0.0343      0.0332  
#>          -1  -0.0245     0.0134       -0.0583      0.0094  
#>           0  -0.0199     0.0131       -0.0530      0.0131  
#>           1  -0.0510     0.0173       -0.0946     -0.0074 *
#>           2  -0.1373     0.0409       -0.2405     -0.0340 *
#>           3  -0.1008     0.0372       -0.1946     -0.0070 *
#> ---
#> Signif. codes: `*' confidence band does not cover 0
#> 
#> Control Group:  Never Treated,  Anticipation Periods:  0
#> Estimation Method:  Doubly Robust

ATT for each group:

aggte(out, type = "group")
#> 
#> Call:
#> aggte(MP = out, type = "group")
#> 
#> Reference: Callaway, Brantly and Pedro H.C. Sant'Anna.  "Difference-in-Differences with Multiple Time Periods." Forthcoming at the Journal of Econometrics <https://arxiv.org/abs/1803.09015>, 2020. 
#> 
#> 
#> Overall summary of ATT’s based on group/cohort aggregation:  
#>     ATT    Std. Error     [ 95%  Conf. Int.]  
#>  -0.031        0.0119    -0.0544     -0.0076 *
#> 
#> 
#> Group Effects:
#>  Group Estimate Std. Error [95% Simult.  Conf. Band]  
#>   2004  -0.0797     0.0274       -0.1399     -0.0196 *
#>   2006  -0.0229     0.0167       -0.0596      0.0137  
#>   2007  -0.0261     0.0165       -0.0623      0.0102  
#> ---
#> Signif. codes: `*' confidence band does not cover 0
#> 
#> Control Group:  Never Treated,  Anticipation Periods:  0
#> Estimation Method:  Doubly Robust

ATT for each calendar year:

aggte(out, type = "calendar")
#> 
#> Call:
#> aggte(MP = out, type = "calendar")
#> 
#> Reference: Callaway, Brantly and Pedro H.C. Sant'Anna.  "Difference-in-Differences with Multiple Time Periods." Forthcoming at the Journal of Econometrics <https://arxiv.org/abs/1803.09015>, 2020. 
#> 
#> 
#> Overall summary of ATT’s based on calendar time aggregation:  
#>      ATT    Std. Error     [ 95%  Conf. Int.]  
#>  -0.0417        0.0173    -0.0757     -0.0077 *
#> 
#> 
#> Time Effects:
#>  Time Estimate Std. Error [95% Simult.  Conf. Band]  
#>  2004  -0.0105     0.0247       -0.0670      0.0460  
#>  2005  -0.0704     0.0313       -0.1418      0.0010  
#>  2006  -0.0488     0.0210       -0.0968     -0.0008 *
#>  2007  -0.0371     0.0134       -0.0677     -0.0064 *
#> ---
#> Signif. codes: `*' confidence band does not cover 0
#> 
#> Control Group:  Never Treated,  Anticipation Periods:  0
#> Estimation Method:  Doubly Robust