For time varying weights: display boxplots within strata of follow-up time. For point treatment weights: display density plot.
ipwplot(weights, timevar = NULL, binwidth = NULL, logscale = TRUE,
xlab = NULL, ylab = NULL, main = "", ref = TRUE, ...)
A plot is displayed.
numerical vector of inverse probability weights to plot.
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.
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.
logical value. If TRUE
, weights are plotted on a logarithmic scale.
label for the horizontal axis.
label for the vertical axis.
main title for the plot.
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).
Willem M. van der Wal willem@vanderwalresearch.com, Ronald B. Geskus rgeskus@oucru.org
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. tools:::Rd_expr_doi("10.18637/jss.v043.i13").
basdat
, haartdat
, ipwplot
, ipwpoint
, ipwtm
, timedat
, tstartfun
.
#see ?ipwpoint and ?ipwtm for examples
Run the code above in your browser using DataLab