Learn R Programming

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

optmatch (version 0.9-15)

Functions for Optimal Matching

Description

Distance based bipartite matching using the RELAX-IV minimum cost flow solver, oriented to matching of treatment and control groups in observational studies. 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

7,776

Version

0.9-15

License

file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Mark Fredrickson

Last Published

August 17th, 2021

Functions in optmatch (0.9-15)

caliper

Prepare matching distances suitable for matching within calipers.
as.InfinitySparseMatrix

Convert an object to InfinitySparseMatrix
InfinitySparseMatrix-class

Objects for sparse matching problems.
c.optmatch

Combine Optmatch objects
cbind.InfinitySparseMatrix

Combine InfinitySparseMatrices or BlockedInfinitySparseMatrices by row or column
antiExactMatch

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

Blocked Infinity Sparse Matrix
caliperSize

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

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

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

List subproblems of a distance
effectiveSampleSize

Compute the effective sample size of a match.
dist_digest

(Internal) Remove the call before digesting a distance so things like omitting caliper and calling caliper=NULL give the same digest #
fill.NAs

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

Generate an exact matching set of subproblems.
fmla2treatedblocking

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

Combine multiple distance specifications into a single distance specification.
dimnames,InfinitySparseMatrix-method

Get and set dimnames for InfinitySparseMatrix objects
fullmatch

Optimal full matching
getMaxProblemSize

What is the maximum allowed problem size?
makeOptmatch

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

Element-wise addition
subset.InfinitySparseMatrix

Subsetting for InfinitySparseMatrices
matched.distances

Determine distances between matched units
matched

Identification of units placed into matched sets
maxCaliper

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

pooled dispersion for a numeric variable Dispersion as pooled across a treatment and a control group. By default, the measure of dispersion calculated within each group is not the ordinary standard deviation but rather the robust alternative provided by stats::mad.
mdist

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

Create treated to control distances for matching problems
minExactMatch

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

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

Functions deprecated or removed from optmatch
optmatch

Optmatch Class
model.frame.svyglm

This method quells a warning when optmatch::scores() is applied to a svyglm object. I don't expect that it to be useful in other contexts, only exporting it for ease of debugging.
optmatch_restrictions

optmatch_restrictions
optmatch_same_distance

Checks if the distance newdist is identical to the distance used to generate the optmatch object obj.
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.
pairmatch

Optimal 1:1 and 1:k matching
maxControlsCap

Set thinning and thickening caps for full matching
nuclearplants

Nuclear Power Station Construction Data
setFeasibilityConstants

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

Display license information about embedded code
print.optmatch

Printing optmatch objects.
plantdist

Dissimilarities of Some U.S. Nuclear Plants
predict.CBPS

(Internal) Predict for CBPS objects
scoreCaliper

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

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

(Internal) Report successful subproblems.
subdim

Returns the dimension of each valid subproblem
update.optmatch

Performs an update on an optmatch object.
setMaxProblemSize

Set the maximum problem size
summary.ism

Summarize a distance matrix
validDistanceSpecification

(Internal) Validate that objects are valid distance specifications.
sort.InfinitySparseMatrix

Sort the internal structure of an InfinitySparseMatrix.
show,InfinitySparseMatrix-method

Displays an InfinitySparseMatrix
show,BlockedInfinitySparseMatrix-method

Displays a BlockedInfinitySparseMatrix
stratumStructure

Return structure of matched sets
standardization_scale

pooled dispersion for a numeric variable
setTryRecovery

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