Learn R Programming

ipw (version 1.0-2)

ipwplot: Plot Inverse Probability Weights

Description

For time varying weights: display boxplots within strata of follow-up time. For point treatment weights: display density plot.

Usage

ipwplot(weights, timevar = NULL, binwidth = NULL, logscale = TRUE,
        xlab = NULL, ylab = NULL, main = "", ref = TRUE, ...)

Arguments

weights
numerical vector of inverse probability weights to plot.
timevar
numerical vector representing follow-up time. When specified, boxplots within strata of follow-up time are displayed. When left unspecified, a density plot is displayed.
binwidth
numerical value indicating the width of the intervals of follow-up time; for each interval a boxplot is made. Ignored when timevar is not specified.
logscale
logical value. If TRUE, weights are plotted on a logarithmic scale.
xlab
label for the horizontal axis. When left unspecified, the name of the quantity on the horizontal axis is used.
ylab
label for the vertical axis. When left unspecified, the name of the quantity on the vertical axis is used.
main
main title for the plot.
ref
logical value. If TRUE, a reference line is plotted at y=1.
...
additional arguments passed to boxplot (when timevar is specified) or plot (when timevar is not specified).

Value

  • A plot is displayed.

See Also

basdat, haartdat, healthdat, ipwplot, ipwpoint, ipwtm, timedat, tstartfun.

Examples

Run this code
#see ?ipwpoint and ?ipwtm for examples

Run the code above in your browser using DataLab