Description Usage Arguments Value
View source: R/bipartite_matches.R
Generates bipartite matched pairs either with replacement, greedily without replacement, or optimally.
1 2 3 4 5 6 7 8 | bipartite_matches(
dist_mat,
treat_vec,
match_method = c("with_replacement", "optimal", "greedy"),
n_sinks = NULL,
tol_val = NULL,
weight_vec = NULL
)
|
dist_mat |
Matrix of pairwise distances. |
treat_vec |
Vector representing all subjects; 0 for control, 1 for treated. |
match_method |
Choice of the three matching methods:
|
n_sinks |
How many sinks to use; can be vector. Default NULL to match all and ignore sinks. |
tol_val |
Tolerance for solving optimal matches (how far from the true optimal value is acceptable). Speed with large value, accuracy with small. |
weight_vec |
Default |
A list with five elements and an optional sixth:
treat_index
index of treated units, from all units
treat_index_within
index of treated units, from the set of treated
control_index
index of control units, from all units
control_index_within
index of control units, from the set of control
distance
distances between the pairs
weight_vec
weight vector used to generate
dist_mat
if supplied
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.