visualize | R Documentation |
Main visualization functions for showing the tradeoffs between two of the three objective functions. Users can specify function values to show, editing labels and changing titles.
visualize( matchingResult, x_axis = "dist1", y_axis = "dist2", xlab = NULL, ylab = NULL, main = NULL, display_all = FALSE, cond = NULL )
matchingResult |
the matching result returned by either distBalMatch or twoDistMatch. |
x_axis |
(optional) the objective function shown on x-axis; "f1" by default. |
y_axis |
(optional) the objective function shown on y-axis; "f3" by default. |
xlab |
(optional) the axis label for x-axis; NULL by default. |
ylab |
(optional) the axis label for y-axis; NULL by default. |
main |
(optional) the title of the graph; NULL by default. |
display_all |
(optional) whether to show all the labels for match index; FALSE by default, which indicates the visualization function only labels matches at quantiles of number of treated units being excluded. |
cond |
(optional) NULL by default, which denotes all the matches are shown; otherwise, takes a list of boolean values indicating whether to include each match |
This is the main function that users can use to obtain possible matchings. Changing the parameters can lead to matchings with varying values of ojective function and level of balance on covariates.
By default, the plotting function will show the tradeoff between the first distance objective function and the marginal balance (if distBalMatch) is used; or simply the second distance objective function, if twoDistMatch is used.
x_axis
and y_axis
are for specifying the objective functions to be plotted on x and y axis. Choices are "dist1", "exclude" or "dist2".
Users can also modify the axis label through arguments xlab
and ylab
.
## Not run: visualize(matchResult1) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.