Skip to contents

Thin wrapper around MatchIt::matchit(distance = "mahalanobis").

Usage

morie_matching_mahalanobis(
  data,
  treatment,
  covariates,
  n_neighbors = 1L,
  caliper = NULL,
  replace = FALSE,
  exact = NULL
)

Arguments

data

Data frame.

treatment

Binary treatment column name.

covariates

Character vector of continuous covariates.

n_neighbors

Number of matches per treated unit.

caliper

Maximum Mahalanobis distance for a valid match.

replace

If TRUE, controls may be re-used.

exact

Optional character vector of variables to match exactly prior to distance matching.

Value

A list of class morie_match_result.

Examples

if (FALSE) { # \dontrun{
morie_matching_mahalanobis(df, "d", c("x1", "x2"), n_neighbors = 1)
} # }