Cameron Davidson-Pilon
Cameron Davidson-Pilon
Hi @JamesPHoughton, it's not implemented yet, and IIRC, it's trickier than the non-time-varying model. Sorry if you lost some time here!
@ioannis12 unfortunately not! Maybe someday
Hi @Asieh-A-Mofrad It's unfortunately a lot more difficult for CTV models. If you are blocked by this, I would suggest bootstrapping to determine your std. errors.
There is a util function in lifelines to make this easy: ```python from lifelines.utils import median_survival_times print median_survival_times(kmf.confidence_interval_) # dataframe """ 0.5 KM_estimate_upper_0.95 530.0 KM_estimate_lower_0.95 468.0 """ ``` What's I...
@robertcv what's not working? Can you provide an example or code snippet?
I'm not sure I'm seeing the same thing as you: ``` from lifelines.utils import median_survival_times kmf = KaplanMeierFitter().fit(np.random.exponential(2, size=50000)) print(median_survival_times(kmf.confidence_interval_)) ``` returns two values, 1.383272 & 1.418151
@pzivich great answer and visuals 👍, I may copy some of this to lifelines docs, too
Hi @DavidSorge - are you able to supply a small sample dataframe that replicates the problem? That would help debug this.
@ibobak, try importing `import autograd.numpy as np` first