Description Usage Arguments Details Value Author(s) References Examples
Given treatment and control groups, finds a pairing of treatment units to controls that maximizes number of matched disjoint pairs satisfying a given caliper.
1 | quickmatch(x, z, caliper, controls = 1L, data, within, method = "nno")
|
x |
Numeric vector with the scores of treated and control objects, or formula, or glm. |
z |
If x is a numeric vector, z is a vector with 1 for treated objects |
caliper |
The caliper, i.e., the maximal distance allowed between |
controls |
The maximal number of controls matched to a single treated object |
data |
An optional data frame, list or environment for arguments x,z and within. |
within |
Vector of factors dividing objects into groups. |
method |
Method for matching: "nno" (default) for optimized NNM or "quickmatch". |
Quickmatch is generic function, calls one of its methods.
A quickmatch object containing:
match.matrix: a (controls+1) columns matrix, each row containing the numbers
of a matched treated (in col 1) and corresponding
control (in columnss 2:(controls+1)) objects. The numbers
of objects are positions in vector x.
If, for a treated object, there are only 0<k<controls
matches, the elements of the row in the
cols (k+2):(controls+1) are filled with integer NAs.
num_pairs: vector of length total.matches showing the number of
controls matched to each treated object. num_pairs[j]
corresponds to the j-th row of match.matrix.
discarded.t: vector of the numbers (positions in x)
of treated objects which are not matched.
discarded.c: vector of the numbers (positions in x)
of control objects which are not matched.
total.matches: the number of matched treated objects, which is the
number of rows in match.matrix.
total.pairs: the number of matched control objects, which is the
number of non-NA elements in columns 2:(controls+1)
of match.matrix
Pavel S. Ruzankin
Marina V. Muravleva
P.S. Ruzankin (2019). A fast algorithm for maximal propensity score matching. Methodol Comput Appl Probab. https://doi.org/10.1007/s11009-019-09718-4
1 | quickmatch(c(1,1.1,2.5,1.5,0.2,2,0.5,2),c(0,1,0,1,0,1,0,1),0.5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.