Learn R Programming

optmatch (version 0.10.8)

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

5,149

Version

0.10.8

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

September 19th, 2024

Functions in optmatch (0.10.8)

BlockedInfinitySparseMatrix-class

Blocked Infinity Sparse Matrix
as.InfinitySparseMatrix

Convert an object to InfinitySparseMatrix
maxControlsCap

Set thinning and thickening caps for full matching
as.list.BlockedInfinitySparseMatrix

Splits a BlockedInfinitySparseMatrix into a list of InfinitySparseMatrices
InfinitySparseMatrix-class

Objects for sparse matching problems.
caliperSize

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

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

Combine multiple distance specifications into a single distance specification.
exactMatch

Generate an exact matching set of subproblems.
dbind

Diagonally bind together subgroup-specific distances
edgelist

Create EdgeList object
c.optmatch

Combine Optmatch objects
findSubproblems

List subproblems of a distance
dimnames,InfinitySparseMatrix-method

Get and set dimnames for InfinitySparseMatrix objects
LEMON

(Internal) Helper function for accessing algorithms in LEMON solver
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.
num_eligible_matches

Returns the number of eligible matches for the distance.
optmatch-defunct

Functions deprecated or removed from optmatch
antiExactMatch

Specify a matching problem where units in a common factor cannot be matched.
effectiveSampleSize

Compute the effective sample size of a match.
caliper

Prepare matching distances suitable for matching within calipers.
fill.NAs

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

Optimal full matching
hash_dist

(Internal) Hashing functions for various distance objects #
getMaxProblemSize

What is the maximum allowed problem size?
subset.InfinitySparseMatrix

Subsetting for InfinitySparseMatrices
model.frame.svyglm

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

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

Compute value of primal problem given flows and arc costs
nuclearplants

Nuclear Power Station Construction Data
match_on

Create treated to control distances for matching problems
show,InfinitySparseMatrix-method

Displays an InfinitySparseMatrix
match_on_szn_scale

pooled dispersion for a numeric variable
optmatch

Optmatch Class
maxCaliper

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

Identification of units placed into matched sets
c,SubProbInfo-method

Combine objects
optmatch_restrictions

optmatch_restrictions
cbind.InfinitySparseMatrix

Combine InfinitySparseMatrices or BlockedInfinitySparseMatrices by row or column
standardization_scale

pooled dispersion for a numeric variable
matched.distances

Determine distances between matched units
strata

Identify Stratafication Variables
plantdist

Dissimilarities of Some U.S. Nuclear Plants
sort.InfinitySparseMatrix

Sort the internal structure of an InfinitySparseMatrix.
compare_optmatch

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

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

(Internal) Report successful subproblems.
predict.CBPS

(Internal) Predict for CBPS objects
setTryRecovery

(Internal) Sets up option to try recovery in fullmatch.
+,InfinitySparseMatrix,InfinitySparseMatrix-method

Element-wise addition
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.
scores

Extract scores (propensity, prognostic,...) from a fitted model
summary.ism

Summarize a distance matrix
makeOptmatch

(Internal) Create optmatch objects, the result of matching.
show,BlockedInfinitySparseMatrix-method

Displays a BlockedInfinitySparseMatrix
update.optmatch

Performs an update on an optmatch object.
pairmatch

Optimal 1:1 and 1:k matching
mdist

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

(Internal) Sets up the default values for maximum feasible problems
setMaxProblemSize

Set the maximum problem size
validDistanceSpecification

(Internal) Validate that objects are valid distance specifications.
minExactMatch

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

Printing optmatch objects.
revise_ArcInfo_nodelabels

Reset implicit node labels of an ArcInfo object
stratumStructure

Return structure of matched sets
subdim

Returns the dimension of each valid subproblem