Hello I am learning about Survival Analysis and I noticed that SAS and R
survival package produce different confidence interval estimates for the median Survival times and I was curious why?
Generating my simulated data in R
set.seed(123) library(survival) size <- 100 deathtime <- rexp(size, rate = 1) censor <- abs(rbinom(size, 1, .1) -1) df <- data.frame(deathtime, censor) #write.csv(df, "TestData.csv") #For uses in SAS
Using the Survival package
surv.obj <- Surv(df$deathtime, df$censor) survfit(surv.obj ~ 1)
proc import datafile="P:\SAS\Interval\TestData.csv" out = test; run; PROC LIFETEST PLOTS=(S) METHOD=PL; TIME deathtime *censor(0) ; RUN;
The point estimate is the same though the confidence intervals differs why?