Dear Users,

I would like to estimate median survival time for a survival model in Stata15. My file has one line per record and 1 failure time. I was using the following approach:

stset surv, id(patid) failure(fail==1) scale(30.4)
sum _t, d
bysort sex: sum _t, d

A colleague has now mentioned that I should be able to use -stci- to achieve the same

stci, by(sex)

The numbers are not the same using -stci- so I am wondering if my original approach is wrong, although I am not fully sure how -stci- is estimating median time.

Thanks for your help,
Laura