The function generates a plot summarizing the balance of the covariates.
plotBalance(dataBalance, ratioVariances = FALSE, boxplots = TRUE)If at least one of the covariates is continuous and ratioVariances=TRUE,
the function generates a plot with two panels: one for the
standardized differences and one for the ratio of the variances (only for the continous variables).
If either all the covariates are categorical/binary or ratioVariances=FALSE (or both),
only the plot with the standardized differences is generated.
The function also returns a list with the ggplot2 objects corresponding to the generated plot(s).
the output of balance.
Boolean. If TRUE, the generated plot contains two panels:
one for the standardized differences and one for the ratios of the variances. If FALSE
(the default), only the standardized differences are represented.
Boolean. If TRUE (default), boxplots are added to the plot, to show the
distribution of the standardized differences and ratios of the variances.
polymatch to generate matched samples and balance to compute
the indicators of balance.
#See examples of function 'balance'
Run the code above in your browser using DataLab