summary.survfit.prev: Obtain N-year survival probability estimates.

Description Usage Arguments Details Value Examples

View source: R/survfit.prev.R

Description

Summarises survival information at pre-specified years of interest on a survfit.prev object.

Usage

1
2
## S3 method for class 'survfit.prev'
summary(object, years = c(1, 3, 5), ...)

Arguments

object

A survfit.prev object.

years

A vector of years for which to estimate survival probability from the bootstrapped survival curves.

...

Arguments passed to main summary function.

Details

Survival probability is estimated as the mean of the bootstrapped survival curves at a specific timepoint, with 2.5 confidence intervals. Survival probability can only be estimated at time points less than the maximum survival time in the original dataset that the prevalence object was fitted to.

Value

None, displays the survival probabilities to screen as a side-effect.

Examples

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

summary(survobj)

summary(survobj, years=c(1, 3, 5, 7))

## End(Not run)

stulacy/rprev-dev documentation built on May 7, 2021, 4:17 a.m.