View source: R/staggered_ife.R
staggered_ife2 | R Documentation |
Compute treatment effects in interactive fixed effects models
with a small number of time periods by exploiting staggered treatment
adoption. Unlike staggered_ife
, this function uses all available
pre-treatment periods for estimation. This is the approach taken in
Callaway and Tsyawo (2023).
staggered_ife2(
yname,
gname,
tname,
idname,
data,
nife,
weighting_matrix = "gmm",
xformla = ~1,
ret_ife_regs = TRUE,
anticipation = 0,
cband = TRUE,
alp = 0.05,
boot_type = "multiplier",
biters = 100,
cl = 1
)
yname |
Name of outcome in |
gname |
Name of group in |
tname |
Name of time period in |
idname |
Name of id in |
data |
balanced panel data |
nife |
the number of interactive fixed effects to include in the model |
weighting_matrix |
which weighting matrix to use in the first step estimates. The default is "gmm" which delivers two-step gmm estimates. Other options are "2sls" and "identity" which uses 2sls in the first stage or uses an identity weighting matrix in the first stage. |
xformla |
Formula for which covariates to include in the model. Default is ~1. |
ret_ife_regs |
Whether or not to return the first stage ife regressions; default is FALSE. |
anticipation |
Number of periods that treatment is anticipated. Default
is 0. This is in “periods”; e.g., code will work in time periods are
equally spaced but 2 years apart. In this case, to allow for treatment
anticipation of 2 year (<=> 1 period), set |
cband |
whether or not to compute a uniform (instead of pointwise) confidence band |
alp |
significance level; default is 0.05 |
boot_type |
should be one of "multiplier" (the default) or "empirical".
The multiplier bootstrap is generally much faster, but |
biters |
number of bootstrap iterations; default is 100 |
cl |
number of clusters to be used when bootstrapping; default is 1 |
ptetools::pte_results
object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.