plotCovariatePrevalence | R Documentation |
Plot prevalence of binary covariates in the target and comparator cohorts, before and after matching.
Requires running computeCovariateBalance
first.
plotCovariatePrevalence(
balance,
threshold = 0,
title = "Covariate prevalence",
fileName = NULL,
beforeLabel = "Before matching",
afterLabel = "After matching",
targetLabel = "Target",
comparatorLabel = "Comparator"
)
balance |
A data frame created by the |
threshold |
A threshold value for standardized difference. When exceeding the threshold, covariates will be
marked in a different color. If |
title |
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 the before matching / stratification panel. |
afterLabel |
Label for the after matching / stratification panel. |
targetLabel |
Label for the x-axis. |
comparatorLabel |
Label for the y-axis. |
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.