The ATT is estimated separately at each level of the effect modifier V with the doubly robust panel estimator of Sant'Anna and Zhao; the contrast between the extreme levels is the interaction, the DiD analogue of effect modification. The level-specific influence functions are computed on disjoint subsamples, so the variance of the contrast is the sum of the level variances.
Value
List with estimate, se, att,
att_se, levels, level_n, att_overall,
se_overall, n_levels, n, method.
References
Sant'Anna and Zhao (2020), Doubly robust difference-in-differences estimators, Journal of Econometrics 219(1):101-122, doi:10.1016/j.jeconom.2020.06.003 ; Hernan and Robins (2020), Causal Inference: What If, chapter 13.
Examples
set.seed(1)
Itrct1(y = rnorm(40), D = rbinom(40, 1, 0.5), V = rbinom(40, 1, 0.5),
X = matrix(rnorm(80), 40, 2))
#> $estimate
#> [1] 1.518831
#>
#> $se
#> [1] 0.6787813
#>
#> $att
#> [1] -0.4899999 1.0288309
#>
#> $att_se
#> [1] 0.5080135 0.4501849
#>
#> $levels
#> [1] 0 1
#>
#> $level_n
#> [1] 19 21
#>
#> $att_overall
#> [1] 0.03664894
#>
#> $se_overall
#> [1] 0.2702592
#>
#> $n_levels
#> [1] 2
#>
#> $n
#> [1] 40
#>
#> $method
#> [1] "DR-DiD (Sant'Anna & Zhao 2020 eq. 2.6) within levels of V; contrast = interaction"
#>
#> attr(,"class")
#> [1] "morie_rich_result" "list"
