Generate histogram of weights and weighted Kaplan-Meier (KM) plot for censored outcomes of an ipcw object.
# S3 method for ipcw
plot(x, time_unit = "day", show_hr = TRUE, show_risk = TRUE, ...)A list of two ggplot2 objects, one for histogram and the other for KM plot.
An object of class ipcw.
The time unit used in the input data. Options are "day" (default), "week", "month", or "year".
Logical; whether to show hazard ratio on the KM plot. Default is TRUE.
Logical; whether to show number at risk table below the KM plot. Default is TRUE.
Ensures that all arguments starting from "..." are named.
Kaifeng Lu, kaifenglu@gmail.com