Learn R Programming

EventPredInCure (version 1.0)

smed: Function to output summary statistics from survfit function output

Description

Provide summary statistics from survfit function output

Usage

smed(x)

Value

"smed" returns a matrix of 5 columns of

Arguments

x

an object returned by "survfit"

Examples

Run this code
n <- 500
event <- runif(n,1, 5)
osc<-1*(event<=4)
os <- pmin(event,4)

fit1<-survival::survfit(survival::Surv(os,osc)~1)
smed(fit1)

Run the code above in your browser using DataLab