Skip to contents

Nearest-neighbour matching with a hard maximum distance, by default on the LOGIT of the propensity score.

Usage

morie_causal_caliper_matching(
  ps,
  treat,
  caliper = NULL,
  k = 1,
  replace = TRUE,
  on_logit = TRUE
)

Arguments

ps

propensity scores, strictly inside (0, 1).

treat

0/1 treatment indicator.

caliper

maximum distance. Defaults to 0.2 standard deviations of the (logit) score, the Austin recommendation.

k

matches per treated unit.

replace

allow reuse of controls.

on_logit

match on the logit scale.

Value

list with matches (0-based), distances, n_unmatched, caliper_used, match_rate, estimand.

Details

The logit scale matters: the raw propensity score is compressed near 0 and 1, so a fixed caliper there is far stricter in the middle of the distribution than at the ends. On the logit the caliper means the same thing everywhere.

Treated units with no control inside the caliper are DROPPED, and that changes the estimand: what remains is the ATT among matchable units, not the ATT. The returned estimand field says which one you actually have.

References

Austin, P. C. (2011). Optimal caliper widths for propensity-score matching. Pharmaceutical Statistics, 10(2), 150-161.

Examples

set.seed(1)
ps <- plogis(rnorm(200))
tr <- rbinom(200, 1, ps)
morie_causal_caliper_matching(ps, tr)$match_rate
#> [1] 0.979798