nelson_aelen_surv: Nelson Aelen estimator

Description Usage Arguments Value See Also Examples

View source: R/my_functions.r

Description

Nelson–Aalen estimator is an estimator of the cumulative hazard function in survival data. It can be used to compare the overall risks of two groups or used to estimate the number of deaths before a certain time.

Usage

1

Arguments

time

The time of each patient.

event

The death of each patient: 1 for a patient death, 0 for censored.

Value

A list containing the cumulative hazard function.

See Also

#https://en.wikipedia.org/wiki/Nelson-Aalen_estimator

Examples

1
2
3
library(survival)
data(veteran)
with(nelson_aelen_surv(veteran$time, veteran$status), plot(ti, Hi, type="b"))

traversc/trqwe documentation built on Dec. 4, 2020, 4:21 a.m.