plotCovariateBalanceOfTopVariables | R Documentation |
Create a plot showing those variables having the largest imbalance before matching, and those
variables having the largest imbalance after matching. Requires running
computeCovariateBalance
first.
plotCovariateBalanceOfTopVariables(
balance,
n = 20,
maxNameWidth = 100,
title = NULL,
fileName = NULL,
beforeLabel = "before matching",
afterLabel = "after matching"
)
balance |
A data frame created by the |
n |
(Maximum) count of covariates to plot. |
maxNameWidth |
Covariate names longer than this number of characters are truncated to create a nicer plot. |
title |
Optional: the main title for the plot. |
fileName |
Name of the file where the plot should be saved, for example 'plot.png'. See
the function |
beforeLabel |
Label for identifying data before matching / stratification / trimming. |
afterLabel |
Label for identifying data after matching / stratification / trimming. |
A ggplot object. Use the ggplot2::ggsave function to save to file in a different format.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.