Skip to contents

Thin wrapper around MatchIt::matchit(method = "nearest", ratio = max_ratio, min.controls = min_ratio) which supports variable-ratio nearest-neighbour matching natively.

Usage

morie_matching_variable_ratio(
  data,
  treatment,
  covariates,
  min_ratio = 1L,
  max_ratio = 5L,
  caliper = 0.2,
  ps = NULL
)

Arguments

data

Data frame.

treatment

Binary treatment column name.

covariates

Character vector of covariates.

min_ratio, max_ratio

Match-count bounds per treated unit.

caliper

Caliper on the propensity score (in SD units).

ps

Optional pre-computed propensity scores (ignored; retained for back-compat).

Value

A list of class morie_match_result.

Examples

if (FALSE) { # \dontrun{
morie_matching_variable_ratio(df, "d", c("x1", "x2"),
                              min_ratio = 1, max_ratio = 3)
} # }