plot.survfit.prev {rprev} | R Documentation |
Plot bootstrapped survival curves.
Description
This method plots survival curves for a survfit.prev
object.
Usage
## S3 method for class 'survfit.prev'
plot(x, ...)
Arguments
x |
A |
... |
Arguments passed to |
Details
The survival curve for a model formed on all the data is displayed in orange, while the 95 as a grey ribbon.
Value
An S3 object of class ggplot
.
Examples
data(prevsim)
## Not run:
prev_obj <- prevalence(Surv(time, status) ~ age(age) + sex(sex) +
entry(entrydate) + event(eventdate),
data=prevsim, num_years_to_estimate = c(5, 10),
population_size=1e6, start = "2005-09-01",
num_reg_years = 8, cure = 5)
survobj <- survfit(prev_obj, newdata=list(age=65, sex=0))
plot(survobj)
## End(Not run)
[Package rprev version 1.0.5 Index]