Get the data from here and read it into R:
Convert left to right censored data:
The Kaplan-Meier estimates can be calculated using survfit() from the survival package:
I set conf.type=”plain” to be concordant with ‘CONFTYPE=LINEAR’ from SAS.
The median of 3.15, 95% CI [1.8, 4.5] is the same as with SAS.
Finally a quick plot:
Code and data are available at my github-repo under filename ‘p39’.