get_pairdist_balance_graph {MultiObjMatch} | R Documentation |
Total variation imbalance vs. marginal imbalance
Description
Plotting function that generate sum of pairwise distance vs.
total variation imbalance on specified balance variable. This function only
works for 'Basic' version of matching (conducted using dist_bal_match
).
Usage
get_pairdist_balance_graph(matching_result)
Arguments
matching_result |
an object returned by the main matching function dist_bal_match |
Value
No return value, called for visualization of match result
See Also
Other Graphical helper functions for analysis:
get_pairdist_graph()
,
get_tv_graph()
Examples
## Generate matches
data("lalonde", package="cobalt")
ps_cols <- c("age", "educ", "married", "nodegree", "race")
treat_val <- "treat"
response_val <- "re78"
pair_dist_val <- c("age", "married", "educ", "nodegree", "race")
my_bal_val <- c("race")
r1s <- c(0.01,1,2,4,4.4,5.2,5.4,5.6,5.8,6)
r2s <- c(0.001)
match_result <- dist_bal_match(data=lalonde, treat_col= treat_val,
marg_bal_col = my_bal_val, exclusion_penalty=r1s, balance_penalty=r2s,
dist_col = pair_dist_val,
propensity_col = ps_cols, max_iter=0)
## Visualize the tradeoff between the pair-wise distance sum and
## total variation distance
get_pairdist_balance_graph(match_result)
[Package MultiObjMatch version 1.0.0 Index]