NelsonAalen#

class relife.lifetime_model.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

fit

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

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

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

Parameters:
timendarray (1d or 2d)

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.

departurendarray of float (1d), default is None

Right truncations applied to lifetime values.