Skip to content

vecmatch

1.4.0Package record

Generalized Propensity Score Estimation and Matching for Multiple Groups

0packages depend
2.9Kdownloads / year
91.4%test coverage
13/13flavors OK

Overview

About

Implements the Vector Matching algorithm to match multiple treatment groups based on previously estimated generalized propensity scores. The package includes tools for visualizing initial confounder imbalances, estimating treatment assignment probabilities using various methods, defining the common support region, performing matching across multiple groups, and evaluating matching quality. For more details, see Lopez and Gutman (2017) doi:10.1214/17-STS612.

Changes in 1.4.0

Major changes

  • balqual() gained two new type values, "desc_full" and "desc_reduced", which report standard descriptive statistics for every balancing variable, separately for each treatment level and for the unmatched and matched dataset. This makes it possible to compare the covariate distributions between both datasets, in addition to the pairwise balance metrics. The tables follow the layout of the balance tables, with the statistics as rows and the two matching stages as the Before and After columns. Numeric covariates are summarized by N, mean, standard deviation, minimum, first quartile, median, third quartile, maximum, skewness and excess kurtosis for "desc_full", or by N, minimum, mean, median and maximum for "desc_reduced". Categorical covariates are instead cross-tabulated, with the count and the percentage of every level within each treatment level, computed separately for each matching stage and printed as a single N (%) cell in a separate table. The two values are mutually exclusive, and both are opt-in, so the default output is unchanged.
Show all changes in 1.4.0Hide the rest of the changes in 1.4.0
  • match_gps() now works with any reference when method = "nnm". The columns kept for matching were selected with a logical mask built on the full csmatrix, but the mask was applied after the treatment column had already been dropped, so every position shifted by one. The gps column of the reference was therefore only retained when the reference happened to be the first gps column of the csmatrix; any other reference failed with undefined columns selected. When it did not fail, the shifted mask kept the neighbouring gps column as well, so [Matching::Matchby()] silently matched on two covariates instead of one and returned a different set of matches. Both branches now index the gps column of the first group of the current combination by name, which also fixes the same error for a user-supplied combos whose group1 differs from reference.
  • match_gps() now actually honours the max_controls argument for method = "fullopt". It was passed to [optmatch::fullmatch()] under a name that function does not accept and carried the value of caliper, so it was silently discarded and had no effect on the matching. Calls that set max_controls to a non-default value will now produce different (correct) results.
  • csregion() now stops with an informative message when the common support region turns out to be empty, or when a treatment group loses all of its observations. Previously such a call failed with non-numeric argument to binary operator, which came from the fallback warning of the internal refitting step rather than from the empty region itself, and gave no hint about the actual cause. With refit = FALSE the same situation returned a zero-row csr object silently, and the problem only surfaced later in match_gps(). Emptying a group is now reported as well, since dropping it would silently change the estimand. The new messages name the groups involved and suggest a larger sample, fewer treatment groups, a different borders value or a different model specification in estimate_gps().

Minor changes and bug fixes

  • match_gps() no longer warns when a method-specific tuning parameter is left at its default. Previously, a call such as match_gps(csr, method = "fullopt") emitted a warning for every unset parameter (order, min_controls, max_controls), which made an ordinary default call look like it had gone wrong. Defaults are now filled in silently. Arguments that do not apply to the selected method are still reported, but only when they were explicitly supplied by the user.
  • The descriptive metrics of balqual() describe the covariates as they are given in the formula, while the balance metrics are computed on the model matrix. A factor is therefore described once by its levels rather than once per dummy-coded column, and interaction terms are covered by the balance metrics only.
  • The statistic argument of balqual() is not used by the descriptive metrics, and a warning is now issued when it is supplied together with type = "desc_full" or type = "desc_reduced" alone.
  • Fixed a bug in balqual(), where the values of the cutoffs argument were matched to the metrics by position across all three balance metrics rather than by name. Passing a subset of the metrics, e.g. type = c("smd", "var_ratio"), raised a recycling warning and could evaluate a metric against the cutoff of another one.
  • print.quality() now returns its argument invisibly, as documented for print() methods, instead of returning it visibly. The visible return value made the quality tables be printed twice whenever the result of print() was itself auto-printed, e.g. inside capture.output() or a knitted document.
  • Fixed the fallback warning of csregion(), which was emitted when refitting the GPS model on the CSR-restricted data fails. Its message was split into three fragments that strwrap() received as the width and indent arguments instead of as text, so the warning aborted instead of being shown.
  • optimize_gps() no longer aborts with $ operator is invalid for atomic vectors when the GPS estimation fails for the first combination of the search space. Failed combinations are passed through as the message of the underlying error, but the treatment levels were read from the first result unconditionally, so a single failure at the head of the estimation space brought down the whole sweep. The first result that actually holds a GPS matrix is now used instead. If every combination fails, the function stops with a message that reports how many were tried and the reason given by the first failure.

Documentation

  • The package documentation is now also available as a pkgdown website at <https://polymerase3.github.io/vecmatch/>. The site collects the reference pages of all exported functions, grouped by the five steps of the vecmatch workflow, together with the vignettes and this changelog, and is rebuilt automatically by a GitHub Actions workflow on every push to main.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 16.0 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-04
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-06-09
  • ERROR12 OK, 1 ERROR2026-06-08
  • NOTE12 OK, 1 NOTE2026-06-07
Show 3 earlier changesHide 3 earlier changes
  • OK13 OK2026-05-12
  • WARNING12 OK, 1 WARNING2026-05-11
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 1.4.0
READMEYes · 500 wordsVignettesYes · 2 · dynamicNEWSYes · 100% structured · mentions 1.4.0Citation fileNoWebsiteYes · pkgdown
Help pages
15 (3 internal)includes a package overview page
Examples that run
73%8 run in a plain check (1 of them under a condition) · 3 only when donttest examples are enabled (R CMD check --as-cran)
Exported functions with examples
85%
Documented parameters
99%
Return-value docs
100%
Help pages citing references
13%

Downloads

2.9K
CRAN downloads in the past year
Rank #8,476 · ~8/day · ~243/mo
Daily download trend is not available in this view yet.
38430 days
1.1K90 days
2.9K1 year
Compare downloads with other packages →
Also on120 r2u

Repository

3Stars
1Forks
4Open issues
0Open PRs
4Releases
263Commits
1Commit identities
263 commits · Last activity 2026-09-08 · 0% stars, 30d · Default branch at 1.4.0.9000, ahead of CRAN 1.4.0 (checked 2026-10-22)
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
99
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2025-05-06 · 22026-07-07 · 3
PracticesBeta

13 development-tooling and community-health practices detected across 8 families in the upstream repository

Checks run against github.com/polymerase3/vecmatch on 2026-10-22.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Governance and community (1)
Contributing guide
Docs source (4)
README.Rmdpkgdown

GitHub Pages site last deployed 2026-09-08 · The repository has a site deploy workflow

pkgdown site last built 2026-09-08

Coverage (1)
Coverage reporting
Show all practicesHide 4 practices
Reproducibility and dev environment (1)
data-raw/
CRAN release process (1)
cran-comments.md
Research and citation (1)
codemeta.json
Lint, format, editor (2)
Lint workflowRStudio project
How this is detected·Detection ruleset v4 (2026-10-20)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • Claude Codefirst seen on or before 2026-09-08
    Commits: at least 2 crediting it in the message
Counts are commits, not lines of code. Commits by a tool's accounts count once across all of its accounts. Commits crediting it are the largest count among its credit lines, a minimum.How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
23 external dependencies (excludes base and recommended)

Installing vecmatch adds 81 packages (40 with compiled code, 71 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, doBy 4.3 MB.

Depends (1)
R >= 3.5
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Datasets

People & History

People (1)
Author, Maintainer since 1.0.2 (2025), Copyright holder
Releases (6)

Pick two releases to compare their code metrics.

  • 1.4.0Latest
    record
    2026-09-08 · current release · diff ↗
  • R
    R 4.6.0 released · 2026-04-24
  • 1.3.0
    record
    2025-12-01 · diff ↗ ·
    added 2 exports
    get_select_params, run_selected_matching
  • 1.2.0
    record
    2025-07-08 · diff ↗ ·
    added 3 exports
    make_opt_args, optimize_gps, select_opt
  • 1.1.0
    record
    2025-04-24 · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • 1.0.3
    record
    2025-03-28 · diff ↗
  • 1.0.2
    record
    2025-03-07
  • R
    R 4.4.0 released · 2024-04-24

Package metadata

First published
2025-03-07
Total releases
6 / 1 yrs
License
GPL (>= 3) OSI
Minimum R
≥ 3.5
Bundled data
19 KB / 1 file
Download size
889 KB
Appears in task views

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("vecmatch")
Kolek, M. (2026). vecmatch: Generalized Propensity Score Estimation and Matching for Multiple Groups (Version 1.4.0) [Computer software]. https://doi.org/10.32614/CRAN.package.vecmatch

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for vecmatch version 1.4.0 [Data set]. HJJB, LLC. Data release v2026-10-25. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy