Uniform Inference for Summary Parameters that aggregate CATTs
aggte_continuous.Rd
`aggte_continuous` computes doubly robust estimates and uniform confidence bands for summary parameters that aggregate group-time conditional average treatment effects (CATT) given a continuous pre-treatment covariate in the staggered difference-in-differences setup of Callaway and Sant'Anna (2021) for balanced panel data. See Imai, Qin, and Yanagi (2025) for more details.
Usage
aggte_continuous(
output,
type = "dynamic",
eval = NULL,
bstrap = TRUE,
biters = 1000,
porder = 2,
bwselect = "IMSE1",
bw = NULL,
uniformall = TRUE
)
Arguments
- output
The output of the `catt_gt_continuous` function. In doing so, several arguments and the uniform inference results for CATT from the `catt_gt_continuous` function can be used in this function. In particular, the following are passed down from output: xformla, zeval, pretrend, control_group, anticipation, alp, and kernel.
- type
Which type of the summary parameter is of interest. Options are "simple", "dynamic", "group", and "calendar". Default is "dynamic".
- eval
The vector of the evaluation point specific to the chosen summary parameter. If type is set to "dynamic", it is the evaluation point e. If type is set to "group", it is the evaluation point g'. If type is set to "calendar", it is the evaluation point t'. If type is set to "simple", there is no evaluation point specific to this summary parameter, and eval should be `NULL`. Default is `NULL` and eval is constructed automatically.
- bstrap
Boolean for whether or not to perform multiplier bootstrapping. Default is `TRUE`. If bstrap is `FALSE`, only the analytical critical value is used.
- biters
The number of bootstrap iterations. This parameter is only applicable if `bstrap = TRUE`. Default is 1000.
- porder
The polynomial order used for the second- and third-stage estimation. Options are 1 and 2, which correspond to the local linear and quadratic regressions, respectively. Default is 2.
- bwselect
The bandwidth selection method used for the aggregation. Options are "IMSE1", "IMSE2", "US1", and "manual". "IMSE1" and "IMSE2" mean the IMSE-optimal bandwidths for the local linear and quadratic regressions, respectively. "US1" means the rule-of-thumb undersmoothing for the local linear regression. "manual" means the manual selection and bw should be specified in this case. Default is "IMSE1", which is recommended for use with `porder = 2`.
- bw
The bandwidth used for the aggregation. Default is `NULL` and the bandwidth is chosen automatically. This parameter is only applicable if bwselect is "manual", and should be a scalar or a vector whose length equals to the number of rows of eval.
- uniformall
Boolean for whether or not to perform the uniform inference over both eval and z. Default is `TRUE` and the uniform inference over eval and z is performed. If `FALSE`, the uniform inference only over z is performed.
Value
A list that contains the following elements.
- Estimate
A data.frame that contains the following elements.
eval: The evaluation point specific to the chosen summary parameter.
z: The covariate value.
est: The doubly robust estimate of the chosen summary parameter.
se: The standard error.
ci1_lower: The lower bound of the analytical UCB.
ci1_upper: The upper bound of the analytical UCB.
ci2_lower: The lower bound of the bootstrap UCB.
ci2_upper: The upper bound of the bootstrap UCB.
bw: The bandwidth.- Figure1
A list that contains the ggplot elements for the analytical UCB
- Figure2
A list that contains the ggplot elements for the bootstrap UCB
References
Callaway, B., & Sant’Anna, P. H. (2021). Difference-in-differences with multiple time periods. Journal of Econometrics, 225(2), 200-230.
Imai, S., Qin, L., & Yanagi, T. (2025). Doubly robust uniform confidence bands for group-time conditional average treatment effects in difference-in-differences. arXiv preprint arXiv:2305.02185.
Examples
if (FALSE) { # \dontrun{
data <- datageneration(
n = 500,
tau = 4,
continuous = TRUE
)
output1 <- catt_gt_continuous(
yname = "Y",
tname = "period",
idname = "id",
gname = "G",
zname = "Z",
xformla = ~ Z,
data = data,
zeval = seq(-1, 1, by = 0.1),
gteval = NULL,
pretrend = FALSE,
control_group = "notyettreated",
anticipation = 0,
alp = 0.05,
bstrap = TRUE,
biters = 1000,
porder = 2,
kernel = "gau",
bwselect = "IMSE1",
bw = NULL,
uniformall = TRUE
)
output2 <- aggte_continuous(
output = output1,
type = "dynamic",
eval = NULL,
bstrap = TRUE,
biters = 1000,
porder = 2,
bwselect = "IMSE1",
bw = NULL,
uniformall = TRUE
)
} # }