| cic | R Documentation |
Computes Quantile Treatment effects on the Treated (QTT) and the Average Treatment Effect on the Treated (ATT) using the Change in Changes identification strategy of Athey and Imbens (2006). Handles two-period data and staggered treatment adoption uniformly: a two-period, two-group dataset is the degenerate single-(g,t) case. Supports both panel and repeated cross sections data.
cic(
yname,
gname,
tname,
idname = NULL,
data,
panel = TRUE,
xformula = ~1,
weightsname = NULL,
control_group = "notyettreated",
anticipation = 0,
alp = 0.05,
cband = TRUE,
biters = 100,
cl = 1,
ret_quantile = NULL,
gt_type = "att",
probs = NULL
)
yname |
Name of the outcome variable in |
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 when
|
data |
A data frame. |
panel |
Logical; |
xformula |
One-sided formula for covariates used in the covariate
adjustment. Default |
weightsname |
Name of the column in |
control_group |
Which units to use as the comparison group:
|
anticipation |
Number of periods of anticipation. Default |
alp |
Significance level for confidence bands. Default |
cband |
Logical; if |
biters |
Number of bootstrap iterations. Default |
cl |
Number of clusters for parallel computation. Default |
ret_quantile |
Passed through to |
gt_type |
Type of group-time effect to compute. |
probs |
For |
For gt_type = "att", a pte_results object from
ptetools. For gt_type = "qtt", a pte_qtt object
with overall, group-specific, and dynamic QTT curves and bootstrap SEs.
Athey, Susan and Guido Imbens. “Identification and Inference in Nonlinear Difference-in-Differences Models.” Econometrica 74(2), pp. 431-497, 2006.
data(mpdta, package = "did")
## ATT aggregated across all groups and periods
res_att <- cic(yname = "lemp", gname = "first.treat", tname = "year",
idname = "countyreal", data = mpdta,
gt_type = "att", biters = 20)
summary(res_att)
## Full QTT curve at selected quantiles
res_qtt <- cic(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_qtt)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.