Trace the whole tradeoff curve between covariate balance and how many units you keep, then estimate the effect at every point on the frontier.
Input · what goes in
A data frame with a binary treatment and the covariates to balance on.
Show data format & exampleHide example
| treat | age | educ | married | re74 | re75 |
|---|---|---|---|---|---|
| 1 | 37 | 11 | 1 | 0 | 0 |
| 0 | 22 | 9 | 0 | 2300 | 1500 |
| 1 | 30 | 12 | 1 | 0 | 0 |
| 0 | 45 | 14 | 0 | 9100 | 8700 |
Pipeline · the recipe
↑ Click any step in the diagram to read its logic, code, assumptions & discussion.
Load MatchIt's lalonde data
Data preparation — shapes the raw inputs into what the estimator expects.
Use the canonical Lalonde job-training data and a treatment ~ covariates specification.
# Install: remotes::install_github("IQSS/MatchingFrontier")
# remotes::install_github("IQSS/MatchingFrontier")
library(MatchingFrontier)
data("lalonde", package = "MatchIt")
- No comments on this step yet — be the first.
Log in to comment on this step.
Compute the matching frontier
The core estimate — where the causal quantity itself is computed.
makeFrontier orders units by their marginal contribution to imbalance, producing every nested matched subset.
f <- makeFrontier(treat ~ age + educ + married + re74 + re75,
data = lalonde, QOI = "FSATT")
- No comments on this step yet — be the first.
Log in to comment on this step.
Estimate effects along the frontier
Reporting — turn the numbers into a figure or table a reader can act on.
Fit the outcome model at each point and plot how the estimate moves as balance improves and N shrinks.
est <- estimateEffects(f, base.form = re78 ~ treat)
plot(est)
- No comments on this step yet — be the first.
Log in to comment on this step.
Output · what you get
Result figure rendered by StatsOtter from the package's documented example — unofficial community showcase; all credit to the original authors.
Result · the numbers
⚠️ Unofficial community showcase of MatchingFrontier (docs). Not affiliated with the authors — all credit to Gary King, Christopher Lucas, Richard Nielsen & Noah Greifer; this summarizes public documentation.
What it does. Matching forces a choice: prune more units for better balance, or keep more for precision. MatchingFrontier computes the entire frontier of that tradeoff at once (King, Lucas & Nielsen 2017), so you can see balance and effect estimates as a function of the sample retained instead of guessing one caliper.
How it works. makeFrontier() orders units so that dropping the next-worst one maximally improves an imbalance metric (e.g. Mahalanobis or L1), producing every nested matched subset from all units down to a few. estimateEffects() then fits the outcome model along the frontier and plot() shows how the estimate moves as you trade sample size for balance.
Assumptions. Unconfoundedness given the covariates and overlap; the frontier characterizes bias–variance, it does not remove unmeasured confounding.
What you get — A nested family of matched samples, an imbalance value and an effect estimate at each point on the balance–N frontier.
Example output
A matching frontier with 614 points.
QOI: FSATT Metric: dist (Mahalanobis)
N ranges from 614 down to 2 units retained.
Use estimateEffects() and plot() to view the effect along the frontier.

Discussion (0)
Log in to join the discussion.