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 \{1, 2, \dots\}.

Y_post

Qualitative outcome after treatment. Must be labeled as \{1, 2, \dots\}.

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

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)


[Package causalQual version 1.0.0 Index]