NelsonAalen#

final class relife.lifetime_models.NelsonAalen[source]#

Nelson-Aalen estimator.

Compute the non-parametric Nelson-Aalen estimator of the cumulative hazard function from lifetime data.

Notes

For a given time instant \(t\) and \(n\) total observations, this estimator is defined as:

\[\hat{H}(t) = \sum_{i: t_i \leq t} \frac{d_i}{n_i}\]

where \(d_i\) is the number of failures until \(t_i\) and \(n_i\) is the number of assets at risk just prior to \(t_i\).

The variance estimation is obtained by:

\[\widehat{Var}[\hat{H}(t)] = \sum_{i: t_i \leq t} \frac{d_i}{n_i^2}\]

Note that the alternative survivor function estimate:

\[\tilde{S}(t) = \exp{(-\hat{H}(t))}\]

is sometimes suggested for the continuous-time case.

References

[1]

Lawless, J. F. (2011). Statistical models and methods for lifetime data. John Wiley & Sons.

Methods

chf

The estimation of the cumulative hazard function.

fit

Compute the non-parametric estimations with respect to lifetime data.

plot

chf()[source]#

The estimation of the cumulative hazard function.

Returns:
outtuple of 3 1darray

A tuple containing the timeline, the estimated values and the estimated standard errors.

fit(time, event=None, entry=None)[source]#

Compute the non-parametric estimations with respect to lifetime data.

Parameters:
timendarray

Observed lifetime values.

eventndarray of boolean values (1d), default is None

Boolean indicators tagging lifetime values as right censored or complete.

entryndarray of float (1d), default is None

Left truncations applied to lifetime values.