Learn R Programming

⚠️There's a newer version (0.10.8) of this package.Take me there.

optmatch (version 0.10.7)

Functions for Optimal Matching

Description

Distance based bipartite matching using minimum cost flow, oriented to matching of treatment and control groups in observational studies ('Hansen' and 'Klopfer' 2006 ). 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.

Copy Link

Version

Install

install.packages('optmatch')

Monthly Downloads

6,365

Version

0.10.7

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Josh Errickson

Last Published

November 15th, 2023

Functions in optmatch (0.10.7)

edgelist

Create EdgeList object
distUnion

Combine multiple distance specifications into a single distance specification.
cbind.InfinitySparseMatrix

Combine InfinitySparseMatrices or BlockedInfinitySparseMatrices by row or column
effectiveSampleSize

Compute the effective sample size of a match.
evaluate_primal

Compute value of primal problem given flows and arc costs
compare_optmatch

Compares the equality of optmatch objects, ignoring attributes and group names.
makeOptmatch

(Internal) Create optmatch objects, the result of matching.
+,InfinitySparseMatrix,InfinitySparseMatrix-method

Element-wise addition
subset.InfinitySparseMatrix

Subsetting for InfinitySparseMatrices
hash_dist

(Internal) Hashing functions for various distance objects #
getMaxProblemSize

What is the maximum allowed problem size?
exactMatch

Generate an exact matching set of subproblems.
fill.NAs

Create missingness indicator variables and non-informatively fill in missing values
match_on

Create treated to control distances for matching problems
maxCaliper

Find the maximum caliper width that will create a feasible problem.
match_on_szn_scale

pooled dispersion for a numeric variable
minExactMatch

Find the minimal exact match factors that will be feasible for a given maximum problem size.
fullmatch

Optimal full matching
dbind

Diagonally bind together subgroup-specific distances
c,SubProbInfo-method

Combine objects
mdist

(Deprecated, in favor of match_on) Create matching distances
pairmatch

Optimal 1:1 and 1:k matching
optmatch_same_distance

Checks if two distances are equivalent. x and y can be distances (InfinitySparseMatrix, BlockedInfinitySparseMatrix, or DenseMatrix), or they can be optmatch objects.
predict.CBPS

(Internal) Predict for CBPS objects
setMaxProblemSize

Set the maximum problem size
optmatch-defunct

Functions deprecated or removed from optmatch
show,InfinitySparseMatrix-method

Displays an InfinitySparseMatrix
maxControlsCap

Set thinning and thickening caps for full matching
print.optmatch

Printing optmatch objects.
num_eligible_matches

Returns the number of eligible matches for the distance.
stratumStructure

Return structure of matched sets
strata

Identify Stratafication Variables
missing_x_msg

(Internal) If the x argument does not exist for match_on, fullmatch, or pairmatch, use this function to print a helpful message.
setFeasibilityConstants

(Internal) Sets up the default values for maximum feasible problems
sort.InfinitySparseMatrix

Sort the internal structure of an InfinitySparseMatrix.
update.optmatch

Performs an update on an optmatch object.
scoreCaliper

(Internal) Helper function to create an InfinitySparseMatrix from a set of scores, a treatment indicator, and a caliper width.
revise_ArcInfo_nodelabels

Reset implicit node labels of an ArcInfo object
nuclearplants

Nuclear Power Station Construction Data
plantdist

Dissimilarities of Some U.S. Nuclear Plants
standardization_scale

pooled dispersion for a numeric variable
model.frame.svyglm

This method quells a warning when optmatch::scores() is applied to a svyglm object.
scores

Extract scores (propensity, prognostic,...) from a fitted model
dimnames,InfinitySparseMatrix-method

Get and set dimnames for InfinitySparseMatrix objects
subdim

Returns the dimension of each valid subproblem
findSubproblems

List subproblems of a distance
matched

Identification of units placed into matched sets
fmla2treatedblocking

(Internal) A helper function to turn formulas into treatment and blocking variables
optmatch

Optmatch Class
matched.distances

Determine distances between matched units
summary.ism

Summarize a distance matrix
subproblemSuccess

(Internal) Report successful subproblems.
validDistanceSpecification

(Internal) Validate that objects are valid distance specifications.
show,BlockedInfinitySparseMatrix-method

Displays a BlockedInfinitySparseMatrix
optmatch_restrictions

optmatch_restrictions
setTryRecovery

(Internal) Sets up option to try recovery in fullmatch.
BlockedInfinitySparseMatrix-class

Blocked Infinity Sparse Matrix
as.InfinitySparseMatrix

Convert an object to InfinitySparseMatrix
caliperUpperBound

(Internal) Returns a reasonable upper bound on the arcs remaining after placing a caliper.
as.list.BlockedInfinitySparseMatrix

Splits a BlockedInfinitySparseMatrix into a list of InfinitySparseMatrices
LEMON

(Internal) Helper function for accessing algorithms in LEMON solver
c.optmatch

Combine Optmatch objects
antiExactMatch

Specify a matching problem where units in a common factor cannot be matched.
InfinitySparseMatrix-class

Objects for sparse matching problems.
caliperSize

(Internal) Determines how many other units fall within a caliper distance
caliper

Prepare matching distances suitable for matching within calipers.