causalQual_did {causalQual} | R Documentation |
Causal Inference for Qualitative Outcomes under Difference-in-Differences
Description
Fit two-group/two-period models for qualitative outcomes to estimate the probabilities of shift on the treated.
Usage
causalQual_did(Y_pre, Y_post, D)
Arguments
Y_pre |
Qualitative outcome before treatment. Must be labeled as |
Y_post |
Qualitative outcome after treatment. Must be labeled as |
D |
Binary treatment indicator. |
Details
Under a difference-in-difference design, identification requires that the probabilities time shift for Y_{is} (0)
for class m
evolve similarly for the treated and control groups (parallel
trends on the probability mass functions of Y_{is}(0)
). If this assumption holds, we can recover the probability of shift on the treated for class m
:
\delta_{m, T} := P(Y_{it} (1) = m | D_i = 1) - P(Y_{it}(0) = m | D_i = 1).
causalQual_did
applies, for each class m
, the canonical two-group/two-period method to the binary variable 1(Y_{is} = m)
. Specifically,
consider the following linear model:
1(Y_{is} = m) = D_i \beta_{m1} + 1(s = t) \beta_{m2} + D_i 1(s = t) \beta_{m3} + \epsilon_{mis}.
The OLS estimate \hat{\beta}_{m3}
of \beta_{m3}
is our estimate of the probability shift on the treated for class m
. Standard errors are clustered at the unit level and used to construct
conventional confidence intervals.
Value
An object of class causalQual
.
Author(s)
Riccardo Di Francesco
References
Di Francesco, R., and Mellace, G. (2025). Causal Inference for Qualitative Outcomes. arXiv preprint arXiv:2502.11691. doi:10.48550/arXiv.2502.11691.
See Also
causalQual_soo
causalQual_iv
causalQual_rd
Examples
## Generate synthetic data.
set.seed(1986)
data <- generate_qualitative_data_did(100, assignment = "observational",
outcome_type = "ordered")
Y_pre <- data$Y_pre
Y_post <- data$Y_post
D <- data$D
## Estimate probabilities of shift on the treated.
fit <- causalQual_did(Y_pre, Y_post, D)
summary(fit)
plot(fit)