
Propensity-score 1:k NN matching with caliper on OTIS data (native)
Source:R/otis_causal.R
morie_otis_psm.RdGreedy 1:k nearest-neighbour matching on the logit propensity score with the Austin (2011) caliper (0.2 SD of the logit-PS by default), mirroring the python implementation. Returns the ATT from matched-set mean differences with the matched-pairs variance.
Examples
set.seed(1)
n <- 300
x <- rnorm(n)
d <- rbinom(n, 1, plogis(0.8 * x))
y <- 1.2 * d + x + rnorm(n)
morie_otis_psm(data.frame(y, d, x), treatment = "d",
outcome = "y", covariates = "x")
#> $estimator
#> [1] "PSM-ATT"
#>
#> $ate
#> [1] 1.341601
#>
#> $ate_se
#> [1] 0.1624992
#>
#> $ate_pval
#> [1] 1.505768e-16
#>
#> $ate_ci95
#> [1] 1.023103 1.660100
#>
#> $n
#> [1] 300
#>
#> $n_treated
#> [1] 149
#>
#> $p_treat
#> [1] 0.4966667
#>
#> $notes
#> $notes[[1]]
#> [1] "1:1 NN, caliper=0.20 SD(logit-PS)"
#>
#> $notes[[2]]
#> [1] "105/149 treated matched"
#>
#>
#> attr(,"class")
#> [1] "morie_causal_estimate" "list"