Learn R Programming

fastStat (version 1.4)

survSum: Calculate Survival Rate and Time

Description

Calculate Survival Rate and Time

Usage

surv_table(fit)

surv_median_time(fit)

surv_year_rate(fit, year)

Arguments

fit

fit by survfit() function

year

year

Value

a dataframe

Examples

Run this code
# NOT RUN {
library(survival)
fit=survfit(Surv(futime, fustat)~rx, data=ovarian)

#survival table
surv_table(fit)

#median survival rate
surv_median_time(fit)

#one year survaival rate
surv_year_rate(fit,365)

#two years survaival rate
surv_year_rate(fit,365*2)

# }

Run the code above in your browser using DataLab