gompertz
survival.gompertz(shape, rate)Gompertz survival curve with an exponentially increasing hazard.
The hazard is rate * exp(shape * t), the standard model for mortality that accelerates with age. shape must be positive so the cumulative hazard diverges as t grows; a curve with a hazard that eventually falls or flattens is not one this family represents.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| shape | float |
Exponential growth rate of the hazard. Must be positive. | required |
| rate | float |
Hazard at time 0. Must be positive. | required |
Returns
| Name | Type | Description |
|---|---|---|
| SurvivalCurve | A SurvivalCurve with cumulative hazard (rate / shape) * (exp(shape * t) - 1). |
Example
from heormodel.survival import gompertz curve = gompertz(shape=0.1, rate=0.01) round(float(curve.survival(10.0)), 5) 0.84212