S(t) = prod (1 - d_i/n_i) with Greenwood's variance and a log-log
confidence interval, which cannot leave [0, 1] the way a symmetric
one can. Note survival::survfit's std.err is the error of the
CUMULATIVE HAZARD; se here is the error of S(t) and se_cumhaz
is survfit's, the two differing by a factor of S.
Examples
morie_kaplan_meier(time = c(1, 2, 3, 4, 5, 6, 7, 8), event = c(0, 1, 0, 1, 1, 0, 1, 0))
#> $time
#> [1] 2 4 5 7
#>
#> $surv
#> [1] 0.8571429 0.6857143 0.5142857 0.2571429
#>
#> $se
#> [1] 0.1322600 0.1862942 0.2038693 0.2084512
#>
#> $se_cumhaz
#> [1] 0.1543033 0.2716791 0.3964125 0.8106435
#>
#> $lower
#> [1] 0.33405388 0.21279741 0.11775958 0.01258426
#>
#> $upper
#> [1] 0.9785611 0.9121118 0.8132486 0.6560160
#>
#> $n_risk
#> [1] 7 5 4 2
#>
#> $n_event
#> [1] 1 1 1 1
#>
#> $n
#> [1] 8
#>
#> $n_events
#> [1] 4
#>
