Package: optmatch 0.10.8

Josh Errickson

optmatch: Functions for Optimal Matching

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.

Authors:Ben Hansen [aut], Mark Fredrickson [aut], Josh Errickson [cre, aut], Josh Buckner [aut], Adam Rauh [ctb]

optmatch_0.10.8.tar.gz
optmatch_0.10.8.tar.gz(r-4.5-noble)optmatch_0.10.8.tar.gz(r-4.4-noble)
optmatch_0.10.8.tgz(r-4.4-emscripten)optmatch_0.10.8.tgz(r-4.3-emscripten)
optmatch.pdf |optmatch.html
optmatch/json (API)
NEWS

# Install 'optmatch' in R:
install.packages('optmatch', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/markmfredrickson/optmatch/issues

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
Datasets:
  • nuclearplants - Nuclear Power Station Construction Data
  • plantdist - Dissimilarities of Some U.S. Nuclear Plants

openblascpp

7.04 score 4 packages 576 scripts 5.3k downloads 23 mentions 37 exports 18 dependencies

Last updated 3 months agofrom:2c1e15d930. Checks:OK: 2. Indexed: no.

TargetResultDate
Doc / VignettesOKDec 01 2024
R-4.5-linux-x86_64OKDec 01 2024

Exports:antiExactMatchas.InfinitySparseMatrixcaliperdbinddistUnioneffectiveSampleSizeexactMatchfill.NAsfindSubproblemsfullfullmatchgetMaxProblemSizeLEMONmahal.distmatch_onmatchedmatched.distancesmatchfailedmaxCalipermaxControlsCapmdistminControlsCapminExactMatchnum_eligible_matchesoptmatch_restrictionsoptmatch_same_distancepairpairmatchpscore.distscoressetMaxProblemSizeshowstandardization_scalestratastratumStructuresubdimunmatched

Dependencies:clidplyrfansigenericsgluelifecyclemagrittrpillarpkgconfigR6Rcpprlangrlemontibbletidyselectutf8vctrswithr

Matching in R using the optmatch package

Rendered fromfullmatch-vignette.Rmdusingknitr::rmarkdownon Dec 01 2024.

Last update: 2023-02-07
Started: 2016-05-03

Combining Matches Within Subgroups

Rendered frommatching-within-subgroups.Rmdusingknitr::rmarkdownon Dec 01 2024.

Last update: 2022-05-13
Started: 2019-07-12

Using Optmatch on data in SAS, Stata, etc

Rendered frommatching-from-foreign-software.Rmdusingknitr::rmarkdownon Dec 01 2024.

Last update: 2022-05-13
Started: 2016-05-03

Readme and manuals

Help Manual

Help pageTopics
Element-wise addition*,InfinitySparseMatrix,InfinitySparseMatrix-method +,InfinitySparseMatrix,InfinitySparseMatrix-method -,InfinitySparseMatrix,InfinitySparseMatrix-method /,InfinitySparseMatrix,InfinitySparseMatrix-method
Specify a matching problem where units in a common factor cannot be matched.antiExactMatch
Convert an object to InfinitySparseMatrixas.InfinitySparseMatrix
Splits a BlockedInfinitySparseMatrix into a list of InfinitySparseMatricesas.list.BlockedInfinitySparseMatrix
Blocked Infinity Sparse MatrixBlockedInfinitySparseMatrix-class
Combine objectsc,ArcInfo-method c,FullmatchMCFSolutions-method c,MCFSolutions-method c,NodeInfo-method c,SubProbInfo-method
Combine Optmatch objectsc.optmatch
Prepare matching distances suitable for matching within calipers.caliper caliper,InfinitySparseMatrix-method caliper,matrix-method caliper,optmatch.dlist-method
Combine InfinitySparseMatrices or BlockedInfinitySparseMatrices by row or columncbind.BlockedInfinitySparseMatrix cbind.InfinitySparseMatrix rbind.BlockedInfinitySparseMatrix rbind.InfinitySparseMatrix
Compares the equality of optmatch objects, ignoring attributes and group names.compare_optmatch
Diagonally bind together subgroup-specific distancesdbind
Get and set dimnames for InfinitySparseMatrix objectsdimnames,InfinitySparseMatrix-method dimnames<-,InfinitySparseMatrix,list-method dimnames<-,InfinitySparseMatrix,NULL-method
Combine multiple distance specifications into a single distance specification.distUnion
Compute the effective sample size of a match.effectiveSampleSize effectiveSampleSize.default effectiveSampleSize.factor effectiveSampleSize.table
Compute value of primal problem given flows and arc costsevaluate_primal
Generate an exact matching set of subproblems.exactMatch exactMatch,formula-method exactMatch,vector-method
Create missingness indicator variables and non-informatively fill in missing valuesfill.NAs
List subproblems of a distancefindSubproblems
Optimal full matchingfull fullmatch
What is the maximum allowed problem size?getMaxProblemSize
Objects for sparse matching problems.InfinitySparseMatrix-class
(Internal) Helper function for accessing algorithms in LEMON solverLEMON
Create treated to control distances for matching problemsmatch_on match_on.bigglm match_on.formula match_on.function match_on.glm match_on.InfinitySparseMatrix match_on.matrix match_on.numeric
Identification of units placed into matched setsmatched matchfailed unmatched
Determine distances between matched unitsmatched.distances
Find the maximum caliper width that will create a feasible problem.maxCaliper
Set thinning and thickening caps for full matchingmaxControlsCap minControlsCap
(Deprecated, in favor of 'match_on') Create matching distancesmdist mdist.bigglm mdist.formula mdist.function mdist.glm mdist.numeric mdist.optmatch.dlist
Find the minimal exact match factors that will be feasible for a given maximum problem size.minExactMatch
Nuclear Power Station Construction Datanuclearplants
Returns the number of eligible matches for the distance.num_eligible_matches num_eligible_matches.BlockedInfinitySparseMatrix num_eligible_matches.InfinitySparseMatrix num_eligible_matches.matrix num_eligible_matches.optmatch.dlist
Optmatch Classoptmatch optmatch-class summary.optmatch
optmatch_restrictionsoptmatch_restrictions
Checks if two distances are equivalent. 'x' and 'y' can be distances ('InfinitySparseMatrix', 'BlockedInfinitySparseMatrix', or 'DenseMatrix'), or they can be 'optmatch' objects.optmatch_same_distance
Functions deprecated or removed from optmatchmahal.dist optmatch-defunct pscore.dist
Optimal 1:1 and 1:k matchingpair pairmatch
Dissimilarities of Some U.S. Nuclear Plantsplantdist
(Internal) Predict for CBPS objectspredict.CBPS
Printing 'optmatch' objects.print.optmatch
(Internal) Helper function to create an InfinitySparseMatrix from a set of scores, a treatment indicator, and a caliper width.scoreCaliper
Extract scores (propensity, prognostic,...) from a fitted modelscores
Set the maximum problem sizesetMaxProblemSize
Displays a BlockedInfinitySparseMatrixshow,BlockedInfinitySparseMatrix-method
Displays an InfinitySparseMatrixshow,InfinitySparseMatrix-method
Sort the internal structure of an InfinitySparseMatrix.sort.BlockedInfinitySparseMatrix sort.InfinitySparseMatrix
Identify Stratafication Variablesstrata
Return structure of matched setsprint.stratumStructure stratumStructure stratumStructure.default stratumStructure.optmatch
Returns the dimension of each valid subproblemsubdim subdim.BlockedInfinitySparseMatrix subdim.InfinitySparseMatrix subdim.matrix subdim.optmatch.dlist
Subsetting for InfinitySparseMatricessubset.InfinitySparseMatrix [,InfinitySparseMatrix-method [<-,InfinitySparseMatrix-method
Summarize a distance matrixsummary.BlockedInfinitySparseMatrix summary.DenseMatrix summary.InfinitySparseMatrix summary.ism
Performs an update on an 'optmatch' object.update.optmatch