plot.survfit.prev: Plot bootstrapped survival curves.

Description Usage Arguments Details Value Examples

View source: R/survfit.prev.R

Description

This method plots survival curves for a survfit.prev object.

Usage

1
2
## S3 method for class 'survfit.prev'
plot(x, ...)

Arguments

x

A survfit.prev object.

...

Arguments passed to plot.

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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)

rprev documentation built on May 4, 2021, 5:08 p.m.