| panel_qtt | R Documentation |
Computes Quantile Treatment Effects on the Treated (QTT) and
the Average Treatment Effect on the Treated (ATT) using the three-period
panel identification strategy of Callaway and Li (2019). Handles
two-period (one post + two pre-treatment periods) and staggered treatment
adoption via ptetools. Requires panel data for both groups.
Identification. Under a copula stability assumption and
distributional parallel trends on changes, the counterfactual distribution
F_{Y(0)^{\text{post}}|D=1} is recovered from three periods of panel
data without requiring rank invariance.
pre_copula. Controls which pre-treatment periods are used as the copula-transfer base for post-treatment cells (g, g+e):
"long" (default)pre2 = 2*(g - anticipation) - (g+e) - 2, matching the copula window to the event horizon e. Cells where pre2 does not exist in the data are excluded from aggregation with two-step weight renormalization.
"short"pre2 = g - anticipation - 2, always anchored at treatment onset.
Pre-test placebo cells always use the sliding base regardless of
pre_copula.
panel_qtt(
yname,
gname,
tname,
idname,
data,
xformula = ~1,
weightsname = NULL,
control_group = "notyettreated",
anticipation = 0,
alp = 0.05,
cband = TRUE,
biters = 100,
cl = 1,
gt_type = "att",
probs = NULL,
pre_copula = "long"
)
yname |
Name of the outcome variable. |
gname |
Name of the treatment group variable (first treatment period; 0 for never-treated units). |
tname |
Name of the time period variable. |
idname |
Name of the unit id variable (required). |
data |
A data frame. |
xformula |
One-sided formula for covariates. Default |
weightsname |
Name of the sampling weights column. Default |
control_group |
|
anticipation |
Number of periods of anticipation. Default |
alp |
Significance level. Default |
cband |
Logical; uniform confidence band if |
biters |
Number of bootstrap iterations. Default |
cl |
Number of parallel clusters. Default |
gt_type |
|
probs |
Quantile grid for |
pre_copula |
|
For gt_type = "att", a pte_emp_boot object. For
gt_type = "qtt", a pte_qtt object.
Callaway, Brantly and Tong Li. “Quantile Treatment Effects in Difference-in-Differences Models with Panel Data.” Quantitative Economics 10(4), pp. 1579-1618, 2019.
cic, qdid, mdid,
ddid
data(mpdta, package = "did")
## Panel QTT with rolling pre-period copula (default pre_copula = "long")
res <- panel_qtt(yname = "lemp", gname = "first.treat", tname = "year",
idname = "countyreal", data = mpdta,
gt_type = "qtt", probs = seq(0.1, 0.9, 0.1), biters = 20)
summary(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.