Skip to contents

H(t) = sum d_i/n_i. Better behaved than -log(KM) in small samples, and the natural scale on which to judge proportional hazards.

Usage

morie_nelson_aalen(time, event)

morie_survival_nelsonaalen(time, event)

Arguments

time

follow-up times

event

1 for an event, 0 for censored

Value

list with time, cumhaz, se and surv = exp(-H)

Examples

if (requireNamespace("survival", quietly = TRUE)) {
  V <- c(1, 2, 3, 4, 5, 6, 7, 8)
  morie_nelson_aalen(V, V)
}
#> $time
#> [1] 1
#> 
#> $cumhaz
#> [1] 0.125
#> 
#> $se
#> [1] 0.125
#> 
#> $surv
#> [1] 0.8824969
#>