exponential

survival.exponential(rate)

Exponential survival curve with a constant hazard.

The special case of weibull with shape=1, kept as its own family because a constant hazard has a closed-form discounted life expectancy, 1 / (discount_rate + rate), used to check heormodel.survival.algebra.apply_hazard_ratio.

Parameters

Name Type Description Default
rate float Constant hazard (events per year). Must be positive. required

Returns

Name Type Description
SurvivalCurve A SurvivalCurve with survival(t) = exp(-rate * t).

Example

from heormodel.survival import exponential curve = exponential(rate=0.2) round(float(curve.survival(5.0)), 5) 0.36788

Back to top