Functions for Optimal Matching
Overview
Distance based bipartite matching using minimum cost flow, oriented to matching of treatment and control groups in observational studies ('Hansen' and 'Klopfer' 2006 doi:10.1198/106186006X137047). Routines are provided to generate distances from generalised linear models (propensity score matching), formulas giving variables on which to limit matched distances, stratified or exact matching directives, or calipers, alone or in combination.
- Updates to internal C++ code.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- NOTE12 OK, 1 NOTE2026-06-07
Show 4 earlier changesHide 4 earlier changes
- OK12 OK2026-04-25
- NOTE11 OK, 3 NOTE2026-04-22
- ERROR10 OK, 3 NOTE, 1 ERROR2026-04-18
- NOTE11 OK, 3 NOTE2026-03-10
Documentation
- Help pages
- 66 (15 internal)
- Examples that run
- 100%16 run in a plain check
- Exported functions with examples
- 50%
- Documented parameters
- 100%
- Return-value docs
- 93%
- Help pages citing references
- 17%
Also includes 1 demo script (run with demo())
Downloads
Repository
- PRs merged (all time)
- 85%
- Median days to close, 50 most recently updated closed issues
- 132
- Median days to close, 50 most recently updated closed PRs
- 6
Stars over time
Forks over time
Issues over time
PRs over time
Commits over time
9 development-tooling and community-health practices detected across 5 families in the upstream repository
Checks run against github.com/markmfredrickson/optmatch on 2026-10-21.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-09-24 · The repository has a site deploy workflow
Show all practicesHide 1 practice
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2026-03-04Commits: at least 2 crediting it in the message
- Claude Opus 4.61 commit · Mar 2026
- Claude Opus 51 commit · Sep 2026
Dependencies
Installing optmatch adds 17 packages (11 with compiled code, 7.5 MB of source tarballs). Heaviest: Rcpp 1.8 MB, vctrs 1.0 MB, dplyr 902 KB.
Show all 23 packagesHide all 23 packages
Code & Tests
Datasets
People & History
Previously maintained by Mark M. Fredrickson (0.7-5 to 0.9-17) and Ben B. Hansen (0.1-6 to 0.7-3).
Show 7 peopleHide 7 people
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- 0.10.8Latest
- RR 4.4.0 released · 2024-04-24
- 0.10.72023-11-15 · diff ↗
- RR 4.3.0 released · 2023-04-21
- 0.10.62023-02-07 · diff ↗
- 0.10.52022-08-15 · diff ↗
- 0.10.42022-08-09 · diff ↗
- 0.10.32022-05-16 · diff ↗
- 0.10.22022-05-15 · diff ↗
- 0.10.1
- RR 4.2.0 released · 2022-04-22
- unarchivedReturned to CRAN2022-03-15
- 0.10.0
- archivedRemoved from CRAN2022-02-23still requires archived package 'RItools'
Show 64 earlier eventsHide 64 earlier events
- unarchivedReturned to CRAN2022-02-22
- 0.9-172022-02-22 · diff ↗
- archivedRemoved from CRAN2022-02-19requires archived package 'RItools'
- 0.9-152021-08-17 · diff ↗
- 0.9-14
- RR 4.1.0 released · 2021-05-18
- RR 4.0.0 released · 2020-04-24
- 0.9-132019-12-06 · diff ↗
- 0.9-122019-10-11 · diff ↗
- 0.9-112019-07-12 · diff ↗
- RR 3.6.0 released · 2019-04-26
- 0.9-102018-07-12 · diff ↗
- 0.9-92018-05-15 · diff ↗
- RR 3.5.0 released · 2018-04-23
- 0.9-82018-01-17 · diff ↗ ·
removed 4 exports
cbind.BlockedInfinitySparseMatrix, cbind.InfinitySparseMatrix, rbind.BlockedInfinitySparseMatrix, rbind.InfinitySparseMatrixadded 2 exports
findSubproblems, setMaxProblemSize - RR 3.4.0 released · 2017-04-21
- 0.9-72016-12-30 · diff ↗
- 0.9-62016-05-03 · diff ↗ ·
added 6 exports
as.InfinitySparseMatrix, cbind.BlockedInfinitySparseMatrix, cbind.InfinitySparseMatrix, effectiveSampleSize, rbind.BlockedInfinitySparseMatrix, rbind.InfinitySparseMatrix - RR 3.3.0 released · 2016-05-03
- 0.9-5
- RR 3.2.0 released · 2015-04-16
- 0.9-3
- RR 3.1.0 released · 2014-04-10
- 0.9-12013-11-01 · diff ↗
- 0.9-02013-08-10 · diff ↗ ·
added 5 exports
num_eligible_matches, optmatch_restrictions, optmatch_same_distance, scores, subdim - 0.8-3
- RR 3.0.0 released · 2013-04-03
- 0.8-12013-01-03 · diff ↗
- 0.8-02012-11-17 · diff ↗ ·
removed 3 exports
makedist, pscore.dist, mahal.distadded 4 exports
match_on, maxCaliper, minExactMatch, exactMatch - 0.7-52012-07-27 · diff ↗
- 0.7-32012-04-02 · diff ↗
- RR 2.15.0 released · 2012-03-30
- RR 2.14.0 released · 2011-10-31
- RR 2.13.0 released · 2011-04-13
- 0.7-12011-03-06 · diff ↗
- RR 2.12.0 released · 2010-10-15
- 0.7-0
- RR 2.11.0 released · 2010-04-22
- 0.6-12010-02-11 · diff ↗
- RR 2.10.0 released · 2009-10-26
- 0.6-0
- 0.5-02009-05-19 · diff ↗
- RR 2.9.0 released · 2009-04-17
- RR 2.8.0 released · 2008-10-20
- 0.4-12008-07-05 · diff ↗
- 0.4-02008-05-20 · diff ↗
- 0.3-92008-05-14 · diff ↗
- 0.3-82008-05-13 · diff ↗
- RR 2.7.0 released · 2008-04-22
- 0.3-42008-02-27 · diff ↗
- RR 2.6.0 released · 2007-10-03
- 0.3-32007-08-25 · diff ↗
- 0.3-22007-08-09 · diff ↗
- 0.3-1
- 0.2-32007-05-10 · diff ↗
- RR 2.5.0 released · 2007-04-24
- 0.2-2
- 0.2-12006-10-30 · diff ↗ ·
added 9 exports
fullmatch, pairmatch, makedist, matched, matchfailed, unmatched, maxControlsCap, minControlsCap, relaxinfo - RR 2.4.0 released · 2006-10-03
- 0.22006-06-12 · diff ↗
- RR 2.3.0 released · 2006-04-24
- 0.1-72006-04-05 · diff ↗
- 0.1-62005-10-29
- RR 2.2.0 released · 2005-10-06
Package metadata
- First published
- 2005-10-29
- Total releases
- 48 / 21 yrs
- License
- MIT + file LICENSE OSI
- Additional repositories
- errickson.net
- Minimum R
- ≥ 3.5.0
- Bundled data
- 1.2 KB / 2 files
- Download size
- 1.0 MB
Cite
Cite this package
Run in R for the authors' entry:
citation("optmatch")The package provides a citation file, so citation() returns the authors' own entry.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.