Survivalanalyse in Python
Shae Wang
Senior Data Scientist
lifelines) zettenmodel.baseline_hazard_.plot()
plt.show()

model.baseline_survival_.plot()
plt.show()

| Berekening | Voorbeeld | |
|---|---|---|
| Coëfficiënt | $x$ | $0.405$ |
| Hazardratio | $e^x$ | $e^{0.405}=1{,}5$ |
| Interpretatie hazards | $e^x-1$ | $1{,}5-1 = 0{,}5$ -> 50% hogere hazard |
| Interpretatie overlevingstijd | $\frac{1}{e^x}-1$ | $\frac{1}{1{,}5}-1 = 0{,}67-1 = -0{,}23$ -> 23% kortere overleving |
.plot_partial_effects_on_outcome()
covariates (string of lijst): naam/namen van de covariaat/covariaten in de originele dataset die we willen variëren.values (1d of 2d iterable): gewenste waarden voor de covariaten.Het model heeft covariaten A, B, C, en we willen {{1}} variëren
A over 1, 2B over 3, 4model.plot_partial_effects_on_outcome(
covariates=["A","B"],
values=[[1,2],
[3,4]]
)
plt.show()

Onjuist...
Het model heeft covariaten A, B, C, en we willen variëren
A over 1, 2B over 3, 4model.plot_partial_effects_on_outcome(
covariates=["A","B"],
values=[[1,3],
[1,4],
[2,3],
[2,4]]
)
plt.show()

Correct!
Survivalanalyse in Python