Nelson-Aalen Estimator

The Nelson-Aalen estimator is a nonparametric estimator of the cumulative hazard function.

The estimate is given by

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

where $d_i$ is the number of observed events at time $t_i$ and $n_i$ is the number of subjects at risk for the event just before time $t_i$.

The pointwise standard error of the log of the survivor function can be computed directly as the standard error or a Bernoulli random variable with $d_i$ successes from $n_i$ samples:

\[\text{SE}(\hat{H}(t)) = \sqrt{\sum_{i: t_i < t} \frac{d_i(n_i-d_i)}{n_i^3}}\]

API

Survival.NelsonAalenType
NelsonAalen{S,T}

An immutable type containing cumulative hazard function estimates computed using the Nelson-Aalen method. The type has the following fields:

  • events: An EventTable summarizing the times and events used to compute the estimates. The time values are of type T.
  • chaz: Estimate of the cumulative hazard at each time. Values are of type S.
  • stderr: Standard error of the cumulative hazard at each time. Values are of type S.

Use fit(NelsonAalen, ...) to compute the estimates as Float64 values and construct this type. Alternatively, fit(NelsonAalen{S}, ...) may be used to request a particular value type S for the estimates.

source
StatsAPI.fitMethod
fit(NelsonAalen, times, status) -> NelsonAalen

Given a vector of times to events and a corresponding vector of indicators that denote whether each time is an observed event or is right censored, compute the Nelson-Aalen estimate of the cumulative hazard rate function.

source
StatsAPI.confintMethod
confint(na::NelsonAalen; level=0.05)

Compute the pointwise confidence intervals for the cumulative hazard function as a vector of tuples.

source

References

  • Nelson, W. (1969). Hazard plotting for incomplete failure data. Journal of Quality Technology 1, 27–52.