Plots the absolute difference in standardized means before and after weighting.
# S3 method for CBMSM
plot(x, covars = NULL, silent = TRUE, boxplot = FALSE, ...)
an object of class “CBMSM”.
Indices of the covariates to be plotted (excluding the
intercept). For example, if only the first two covariates from
balance
are desired, set covars
to 1:2. The default is
NULL
, which plots all covariates.
If set to FALSE
, returns the absolute imbalance for
each treatment history pair before and after weighting. This helps the user
to create his or her own customized plot. Default is TRUE
, which
returns nothing.
If set to TRUE
, returns a boxplot summarizing the
imbalance on the covariates instead of a point for each covariate. Useful
if there are many covariates.
Additional arguments to be passed to plot.
The x-axis gives the imbalance for each covariate-treatment history pair without any weighting, and the y-axis gives the imbalance for each covariate-treatment history pair after CBMSM weighting. Imbalance is measured as the absolute difference in standardized means for the two treatment histories. Means are standardized by the standard deviation of the covariate in the full sample.
Covariate balance is improved if the plot's points are below the plotted line of y=x.