apply_acceleration_factor

survival.apply_acceleration_factor(curve, acceleration_factor)

Accelerated-failure-time transform: rescale the time axis.

Stretches or compresses the curve in time, survival(t) = curve.survival(t / acceleration_factor), so an acceleration factor above 1 pushes every event later and extends survival, and one below 1 pulls events earlier.

Parameters

Name Type Description Default
curve SurvivalCurve The comparator curve. required
acceleration_factor float Multiplicative factor on event time. Must be positive. required

Returns

Name Type Description
SurvivalCurve A new SurvivalCurve on the rescaled time axis.

Example

from heormodel.survival import apply_acceleration_factor, weibull base = weibull(shape=1.2, scale=6.0) stretched = apply_acceleration_factor(base, acceleration_factor=2.0) round(float(stretched.survival(12.0)), 5) == round(float(base.survival(6.0)), 5) True

Back to top