Skip to content

nbpMatching

Functions for Optimal Non-Bipartite Matching

v1.5.6 · Sep 24, 2024 · GPL (>= 2)

Description

Perform non-bipartite matching and matched randomization. A "bipartite" matching utilizes two separate groups, e.g. smokers being matched to nonsmokers or cases being matched to controls. A "non-bipartite" matching creates mates from one big group, e.g. 100 hospitals being randomized for a two-arm cluster randomized trial or 5000 children who have been exposed to various levels of secondhand smoke and are being paired to form a greater exposure vs. lesser exposure comparison. At the core of a non-bipartite matching is a N x N distance matrix for N potential mates. The distance between two units expresses a measure of similarity or quality as mates (the lower the better). The 'gendistance()' and 'distancematrix()' functions assist in creating this. The 'nonbimatch()' function creates the matching that minimizes the total sum of distances between mates; hence, it is referred to as an "optimal" matching. The 'assign.grp()' function aids in performing a matched randomization. Note bipartite matching can be performed using the prevent option in 'gendistance()'.

Downloads

433

Last 30 days

8756th

1.6K

Last 90 days

7.8K

Last year

Trend: -6.3% (30d vs prior 30d)

CRAN Check Status

14 OK
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-macos-arm64 OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026

Reverse Dependencies (11)

depends

Dependency Network

Dependencies Reverse dependencies Hmisc MASS nearfar GPSCDF GraphRankTest GreedyExperimentalDesign crossmatch nbpInference DataSimilarity blockTools hamlet rsmatch weightedRank nbpMatching

Version History

new 1.5.6 Mar 10, 2026
updated 1.5.6 ← 1.5.5 diff Sep 24, 2024
updated 1.5.5 ← 1.5.4 diff May 16, 2024
updated 1.5.4 ← 1.5.1 diff Aug 18, 2023
updated 1.5.1 ← 1.5.0 diff Apr 18, 2016
updated 1.5.0 ← 1.4.5 diff Jan 12, 2016
updated 1.4.5 ← 1.4.4 diff May 14, 2015
updated 1.4.4 ← 1.4.0 diff Jan 20, 2015
updated 1.4.0 ← 1.3.6 diff Apr 16, 2013
updated 1.3.6 ← 1.3.2 diff Nov 4, 2012
updated 1.3.2 ← 1.0 diff Oct 28, 2012
new 1.0 Sep 17, 2009