% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Balance.R
\name{plotCovariateBalanceOfTopVariables}
\alias{plotCovariateBalanceOfTopVariables}
\title{Plot variables with largest imbalance}
\usage{
plotCovariateBalanceOfTopVariables(
  balance,
  n = 20,
  maxNameWidth = 100,
  title = NULL,
  fileName = NULL,
  beforeLabel = "before matching",
  afterLabel = "after matching"
)
}
\arguments{
\item{balance}{A data frame created by the \code{computeCovariateBalance} function.}

\item{n}{(Maximum) count of covariates to plot.}

\item{maxNameWidth}{Covariate names longer than this number of characters are truncated to create
a nicer plot.}

\item{title}{Optional: the main title for the plot.}

\item{fileName}{Name of the file where the plot should be saved, for example 'plot.png'. See
the function \code{ggsave} in the ggplot2 package for supported file formats.}

\item{beforeLabel}{Label for identifying data before matching / stratification / trimming.}

\item{afterLabel}{Label for identifying data after matching / stratification / trimming.}
}
\value{
A ggplot object. Use the \link[ggplot2:ggsave]{ggplot2::ggsave} function to save to file in a different
format.
}
\description{
Create a plot showing those variables having the largest imbalance before matching, and those
variables having the largest imbalance after matching. Requires running
\code{computeCovariateBalance} first.
}
