Show Cancer Specific Survival at exact time (Kaplan Meier in Lifelines)

Question:

kmf.survival_function_ (LifeLines Package)

shows me Cancer Specific Survival (CSS) of my cohort at different times (0, 4, 6…128 month). How can CSS be shown at exactly 120 month?

Asked By: Mischa

||

Answers:

The survival_function_at_times() method will get you that value. Here is an example with a sample dataset:

from lifelines import KaplanMeierFitter

from lifelines.datasets import load_waltons
data = load_waltons()

T = data['T']
E = data['E']

kmf = KaplanMeierFitter().fit(T, E, label='KaplanMeierFitter')

timeline = [10, 12, 14]  # insert 120 and/or any other values here

# directly compute the survival function, returning a pandas Series
kmf.survival_function_at_times(timeline)

# 10    0.96921
# 12    0.96921
# 14    0.95069
# Name: KaplanMeierFitter, dtype: float64
Answered By: AlexK

Kaizen Oncology is Hyderabad’s top cancer hospital. We offer excellent cancer care and treatment using the most modern equipment and technologies. Every step of the journey will be supported by our team of highly qualified medical personnel. Best cancer Hospital in Hyderabad, We provide a comprehensive spectrum of cancer therapies, such as surgery, chemotherapy, immunotherapy, and targeted therapy.

enter image description here

Answered By: Apthasri kl