| cic | R Documentation |
Implements the Changes-in-Changes (CIC) estimator of Athey and Imbens (2006) for the average treatment effect on the treated in a two-group, two-period difference-in-differences setting.
cic(
y_00,
y_01,
y_10,
y_11,
se = TRUE,
boot = FALSE,
boot_iters = 500L,
seed = NULL,
discrete = FALSE
)
y_00 |
Numeric vector. Outcomes for the control group in the pre-treatment period. |
y_01 |
Numeric vector. Outcomes for the control group in the post-treatment period. |
y_10 |
Numeric vector. Outcomes for the treated group in the pre-treatment period. |
y_11 |
Numeric vector. Outcomes for the treated group in the post-treatment period. |
se |
Logical. If |
boot |
Logical. If |
boot_iters |
Integer. Number of bootstrap iterations. Default 500. |
seed |
Integer or |
discrete |
Logical. If |
The CIC estimator constructs a counterfactual distribution for the treated group in the post-treatment period by applying the transformation:
Y^{N,CIC}_{11} = F^{-1}_{Y,01}(F_{Y,00}(Y_{10}))
The average treatment effect is then:
\hat{\tau}^{CIC} = \frac{1}{N_{11}} \sum Y_{11,i}
- \frac{1}{N_{10}} \sum F^{-1}_{Y,01}(F_{Y,00}(Y_{10,i}))
The analytic variance follows Theorem 5.1 of Athey and Imbens (2006):
Var(\sqrt{N} \hat{\tau}^{CIC}) = V^p/\alpha_{00} + V^q/\alpha_{01}
+ V^r/\alpha_{10} + V^s/\alpha_{11}
An object of class "cic" containing:
tau |
The CIC average treatment effect estimate. |
se |
Analytic standard error (if |
z |
z-statistic. |
pval |
Two-sided p-value. |
counterfactual_mean |
Mean of the counterfactual distribution. |
tau_did |
The standard DID estimate for comparison. |
N |
Total sample size. |
n |
Named vector of group sample sizes. |
boot_se |
Bootstrap standard error (if |
ecdfs |
List of empirical CDF objects for each group. |
Athey, S. and Imbens, G. W. (2006). Identification and Inference in Nonlinear Difference-in-Differences Models. Econometrica, 74(2), 431–497. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1111/j.1468-0262.2006.00668.x")}
# Workers' compensation example (Meyer, Viscusi, and Durbin 1995)
if (requireNamespace("wooldridge", quietly = TRUE)) {
data("injury", package = "wooldridge")
result <- cic(
y_00 = injury$ldurat[injury$highearn == 0 & injury$afchnge == 0],
y_01 = injury$ldurat[injury$highearn == 0 & injury$afchnge == 1],
y_10 = injury$ldurat[injury$highearn == 1 & injury$afchnge == 0],
y_11 = injury$ldurat[injury$highearn == 1 & injury$afchnge == 1]
)
print(result)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.