kmvalue function

Obtain values for Kaplan-Meier plotting

Obtain values for Kaplan-Meier plotting

kmvalue(x)

Arguments

  • x: Nx2 data matrix,first columen represents survival time of the i-th subject, second column represents censored flag (0 if not censored, 1 if censored)

Returns

Values used for Kaplan-Meier plotting

Examples

t1 <- c(2,3,4,5.5,7,10,12,15) c1 <- c(0,0,1,0,0,1,0,0) x1<-cbind(t1,c1) kmvalue(x1)