ipwplot: Plot Inverse Probability Weights

View source: R/ipwplot.R

ipwplotR Documentation

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.

ylab

label for the vertical axis.

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.

Author(s)

Willem M. van der Wal willem@vanderwalresearch.com, Ronald B. Geskus rgeskus@oucru.org

References

Van der Wal W.M. & Geskus R.B. (2011). ipw: An R Package for Inverse Probability Weighting. Journal of Statistical Software, 43(13), 1-23. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v043.i13")}.

See Also

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

Examples

#see ?ipwpoint and ?ipwtm for examples

ipw documentation built on June 22, 2024, 6:58 p.m.

Related to ipwplot in ipw...