groupmatch | R Documentation |
This is an adaption of fullmatch
to allow for
restrictions when control observations are "grouped". The motivating use
case is when there are multiple observations of control data for each
control subject. In this case, the grouping variable is the subject. We
may want to place restrictions, for example that only one observation of
a subject can be matched, or in the case of one:many matching, a given
control subject can only be matched to a given treated subject once.
groupmatch( x, group = NULL, allow_duplicates = FALSE, min.controls = 0, max.controls = Inf, omit.fraction = NULL, mean.controls = NULL, tol = 0.001, data = NULL, ... )
x |
Any valid input to If Alternatively, a precomputed distance may be entered. A matrix of
non-negative discrepancies, each indicating the permissibility and
desirability of matching the unit corresponding to its row (a 'treatment') to
the unit corresponding to its column (a 'control'); or, better, a distance
specification as produced by |
group |
Grouping variable for control group. In the case of rolling enrollment, this will be a unique subject identifier pertaining to all 'copies' or 'versions' of the same subject. |
allow_duplicates |
When |
min.controls |
The minimum ratio of controls to treatments that is to
be permitted within a matched set: should be non-negative and finite. If
Currently, When matching within subclasses (such as those created by
|
max.controls |
The maximum ratio of controls to treatments that is
to be permitted within a matched set: should be positive and numeric.
If When matching within subclasses (such as those created by
|
omit.fraction |
Optionally, specify what fraction of controls or treated
subjects are to be rejected. If When matching within subclasses (such as those created by
At most one of |
mean.controls |
Optionally, specify the average number of controls per
treatment to be matched. Must be no less than than When matching within subclasses (such as those created by
At most one of |
tol |
Because of internal rounding, |
data |
Optional |
... |
Additional arguments, including |
A optmatch
object (factor
) indicating matched groups.
Pimentel, SD, Forrow, LV, Gellar, J, and J Li (2019). Optimal matching approaches in health policy evaluations under rolling enrolment. Journal of the Royal Statistical Society Series A 183(4), 1411-1435. https://doi.org/10.1111/rssa.12521
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.