weibull

survival.weibull(shape, scale)

Weibull survival curve, S(t) = exp(-(t / scale) ** shape).

The accelerated-failure-time parameterization: scale sets the time axis, in the curve’s time unit (typically years), and shape controls whether the hazard rises (shape > 1), falls (shape < 1), or stays constant (shape == 1, equivalent to exponential(1 / scale)).

Parameters

Name Type Description Default
shape float Weibull shape parameter. Must be positive. required
scale float Weibull scale parameter, in the curve’s time unit. Must be positive. required

Returns

Name Type Description
SurvivalCurve A SurvivalCurve with survival(t) = exp(-(t / scale) ** shape).

Example

from heormodel.survival import weibull curve = weibull(shape=1.2, scale=6.0) round(float(curve.survival(6.0)), 5) 0.36788

Back to top