Description Usage Arguments Details Value Examples
View source: R/post_matching.R
MG
returns the matched groups of the supplied units.
1 |
units |
A vector of units whose matched groups are desired. |
ame_out |
An object of class |
multiple |
A logical scalar. If |
id_only |
A logical scalar. If |
index_only |
Defunct. Use 'id_only' instead. |
The units
argument refers to units with respect to
rownames(ame_out$data)
. Typically, this will also correspond to the
indexing of the data (i.e. passing units = 3
will return the matched
group of the 3rd unit in the matching data). However, if a separate holdout
set was not passed to the matching algorithm or if the original matching data
had rownames other than 1:nrow(data)
, then this is not the case.
The multiple
argument toggles whether only a unit's main matched group
(MMG) or all matched groups a unit is part of should be returned. A unit's
MMG contains its highest quality matches (that is, the units with which it
first matched in the sequence of considered covariate sets). If the original
call that generated ame_out
specified replace = FALSE
then
units only are part of one matched group (which is also their MMG) and
multiple
must be set to FALSE
.
A list of length length(units)
, each entry of which corresponds to a
different unit in units
. For matched units, if multiple =
FALSE
, each entry is 1. a data frame containing the treatment and outcome
information of members of the matched group, along with covariates they
were matched on if id_only = FALSE
or 2. a vector of the IDs of
matched units if id_only = TRUE
. If multiple = TRUE
, each
entry of the returned list is a list containing the previously described
information, but with each entry corresponding to a different matched
group. In either case, entries corresponding to unmatched units are
NULL
.
1 2 3 4 5 6 7 8 9 10 11 12 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.