
Propensity-score subclassification ATE on OTIS data (native)
Source:R/otis_causal.R
morie_otis_psm_subclass.RdRosenbaum-Rubin (1983) propensity-score stratification with the Cochran (1968) five-stratum convention: PS quintile strata, within-stratum treated-control mean differences, aggregated with stratum-size weights; SE from the weighted within-stratum variances. Strata missing either arm are dropped (and reported).
Examples
set.seed(1)
n <- 400
x <- rnorm(n)
d <- rbinom(n, 1, plogis(0.6 * x))
y <- 1.5 * d + x + rnorm(n)
morie_otis_psm_subclass(data.frame(y, d, x), treatment = "d",
outcome = "y", covariates = "x")
#> $estimator
#> [1] "PS-subclass"
#>
#> $ate
#> [1] 1.657085
#>
#> $ate_se
#> [1] 0.125336
#>
#> $ate_pval
#> [1] 6.625251e-40
#>
#> $ate_ci95
#> [1] 1.411426 1.902744
#>
#> $n
#> [1] 400
#>
#> $n_treated
#> [1] 194
#>
#> $p_treat
#> [1] 0.485
#>
#> $notes
#> $notes[[1]]
#> [1] "strata=5 (dropped 0 without both arms)"
#>
#>
#> $strata
#> stratum n diff
#> [1,] 1 80 1.960552
#> [2,] 2 80 1.797201
#> [3,] 3 80 1.231225
#> [4,] 4 80 1.597197
#> [5,] 5 80 1.699250
#>
#> attr(,"class")
#> [1] "morie_causal_estimate" "list"