summary.survfit.prev {rprev} | R Documentation |
Summarises survival information at pre-specified years of interest on a
survfit.prev
object.
## S3 method for class 'survfit.prev'
summary(object, years = c(1, 3, 5), ...)
object |
A |
years |
A vector of years for which to estimate survival probability from the bootstrapped survival curves. |
... |
Arguments passed to main |
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.
None, displays the survival probabilities to screen as a side-effect.
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)