Hello All, ? Am replicating in R an analysis I did earlier using SAS. See this as a test of whether I'm ready to start using R in my day-to-day work. ? Just finished replicating a Kaplan Meier analysis. Everything seems to work out fine except for one thing. The 95% CI around my estimate for the median is substantially larger in R than in SAS. For example, in SAS I have a median of 3.29 with a 95% CI of [1.15, 5.29]. In R, I get a median of 3.29 with a 95% CI of [1.35,?13.35]. ? Can anyone tell me why I get this difference? ? My R code looks like: ? survfrm <- Surv(progression_months_landmark_14,progression==1) ~ pr_rg_landmark_14 survobj <- survfit(survfrm, data=Survival) survlrk <- survdiff(survfrm, data=Survival) summary(survobj) print(survobj) print(survlrk) ? My SAS code looks like: ? proc lifetest data=survival; strata pr_rg_landmark_14; time progression_months_landmark_14 * progression(0); run; Thought maybe the difference could have something to do with the strata statement in the SAS code not being translated properly into R. Tried changing my R code to make pr_rg_landmark_14 a strata but this didn't seem to change anything. Except that I no longer got a log rank test. Thanks, Paul ? ? ? ? ? ? ?
Kaplan Meier analysis: 95% CI wider in R than in SAS
1 message · Paul Miller