hist.ipw.Rd
hist.ipw
is a function that takes as an argument a list of ipw
objects,
or the objects provided as independent arguments. The function
returns a ggplot2
object containing propensity score histograms for each of
the supplied models.
# S3 method for ipw
hist(
...,
cat = 2,
ncol = 2,
xlab = NULL,
ylab = "Density",
panel_dim = 1,
binwidth = 0.02,
weight = FALSE,
by_treat = TRUE,
legend_title = "Treatment \nGroup",
colors = "Dark2"
)
ipw
objects supplied as a list or as seperate arguments
For multinomial propensity score, the arguments specifies which category probabilities are plotted.
The number of columns for the paneling
The x-axis label
The y-axis label
The number of dimensions for the paneling (either 1 or 2).
The width of the histogram bins (default is 0.05).
If true, the histogram will be weighted with the treatment weights (default = FALSE)
If TRUE, the histogram will be stratified by treatment group, otherwise it will depict the overall distribution of the PS in the sample. (default = TRUE)
A string used to title the legend, default is "Treatment Groups"
Set colors for resulting ggplot
object. Either a vector of
strings which are interpreted as RGB codes or a sinlge string that
identifies as color brewer palette. If set to NULL, hist.ipw
will use
grey shades. As a default, hist.ipw uses the color brewer palette
'Dark2'.
A ggplot2
object that can be further modified by the user before
plotting.