| plot.tsegest | R Documentation |
Generate Z-plot and Kaplan-Meier (KM) plot of a tsegest object.
## S3 method for class 'tsegest'
plot(x, time_unit = "day", show_hr = TRUE, show_risk = TRUE, ...)
x |
An object of class |
time_unit |
The time unit used in the input data. Options are "day" (default), "week", "month", or "year". |
show_hr |
Logical; whether to show hazard ratio on the KM plot. Default is TRUE. |
show_risk |
Logical; whether to show number at risk table below the KM plot. Default is TRUE. |
... |
Ensures that all arguments starting from "..." are named. |
A list of two ggplot2 objects, one for Z-plot and the other for KM plot.
Kaifeng Lu, kaifenglu@gmail.com
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.