Treated units keep weight 1; controls are reweighted by
e / (1 - e) so the control arm matches the treated covariate
distribution. Mirrors morie.fn.causipsw.
Usage
morie_att_weights(treat, ps)
Arguments
- treat
Binary 0/1 treatment indicator.
- ps
Estimated propensity scores, strictly inside (0, 1) for
controls.
Value
List with weights, ess_control, ess_treated, n.
References
Hernan MA, Robins JM (2020). Causal Inference: What
If. Chapman & Hall/CRC, Ch. 15.
Examples
morie_att_weights(c(1, 0, 0), c(0.5, 0.25, 0.5))
#> $weights
#> [1] 1.0000000 0.3333333 1.0000000
#>
#> $ess_control
#> [1] 1.6
#>
#> $ess_treated
#> [1] 1
#>
#> $n
#> [1] 3
#>