Learn R Programming

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

optmatch (version 0.9-17)

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

6,120

Version

0.9-17

License

file LICENSE

Issues

Pull Requests

Stars

Forks

Last Published

February 22nd, 2022

Functions in optmatch (0.9-17)

as.InfinitySparseMatrix

Convert an object to InfinitySparseMatrix
cbind.InfinitySparseMatrix

Combine InfinitySparseMatrices or BlockedInfinitySparseMatrices by row or column
InfinitySparseMatrix-class

Objects for sparse matching problems.
compare_optmatch

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

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

Blocked Infinity Sparse Matrix
c.optmatch

Combine Optmatch objects
caliper

Prepare matching distances suitable for matching within calipers.
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.
dimnames,InfinitySparseMatrix-method

Get and set dimnames for InfinitySparseMatrix objects
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 #
num_eligible_matches

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

Functions deprecated or removed from optmatch
+,InfinitySparseMatrix,InfinitySparseMatrix-method

Element-wise addition
nuclearplants

Nuclear Power Station Construction Data
subset.InfinitySparseMatrix

Subsetting for InfinitySparseMatrices
distUnion

Combine multiple distance specifications into a single distance specification.
print.optmatch

Printing optmatch objects.
model.frame.svyglm

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

Returns the dimension of each valid subproblem
relaxinfo

Display license information about embedded code
findSubproblems

List subproblems of a distance
fmla2treatedblocking

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

Optimal full matching
show,BlockedInfinitySparseMatrix-method

Displays a BlockedInfinitySparseMatrix
setTryRecovery

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

What is the maximum allowed problem size?
makeOptmatch

(Internal) Create optmatch objects, the result of matching.
matched.distances

Determine distances between matched units
match_on

Create treated to control distances for matching problems
subproblemSuccess

(Internal) Report successful subproblems.
minExactMatch

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

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

Return structure of matched sets
standardization_scale

pooled dispersion for a numeric variable
maxCaliper

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

(Internal) Predict for CBPS objects
maxControlsCap

Set thinning and thickening caps for full matching
plantdist

Dissimilarities of Some U.S. Nuclear Plants
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.
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.
exactMatch

Generate an exact matching set of subproblems.
fill.NAs

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

optmatch_restrictions
optmatch

Optmatch Class
scoreCaliper

(Internal) Helper function to create an InfinitySparseMatrix from a set of scores, a treatment indicator, and a caliper width.
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.
matched

Identification of units placed into matched sets
pairmatch

Optimal 1:1 and 1:k matching
setMaxProblemSize

Set the maximum problem size
setFeasibilityConstants

(Internal) Sets up the default values for maximum feasible problems
show,InfinitySparseMatrix-method

Displays an InfinitySparseMatrix
sort.InfinitySparseMatrix

Sort the internal structure of an InfinitySparseMatrix.
scores

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

(Internal) Validate that objects are valid distance specifications.
summary.ism

Summarize a distance matrix
update.optmatch

Performs an update on an optmatch object.