Aan de slagGa gratis aan de slag

Plotting the survival curve

You learned that there are different ways to plot the survival function from the Kaplan-Meier estimator. A survival function on the term lengths of Canadian senators has been fitted for you using KaplanMeierFitter and the instance is called senator_kmf. Try plotting senator_kmf in the console. After each plot, you may run plt.clf() to clear the figure.

Select the correct ways to plot the survival function.

  • A. senator_kmf.plot_survival_function()
  • B. senator_kmf.plot_survival_distribution()
  • C. senator_kmf.survival_function_.plot()
  • D. plt.plot(senator_kmf)
  • E. senator_kmf.plot()

Deze oefening maakt deel uit van de cursus

Survival Analysis in Python

Cursus bekijken

Praktische interactieve oefening

Zet theorie om in actie met een van onze interactieve oefeningen.

Begin met trainen