NelsonAalen: Nelson Aalen Estimator

Description Usage Arguments Details Value Examples

View source: R/survivalfunctions.R

Description

Cumulative hazard function estimate using Nelson Aalen method

Usage

1
NelsonAalen(x, rs, survival = FALSE)

Arguments

x

The value to pass to the Nelson Aalen function

rs

is the output from RiskSet(...)

survival

If TRUE return estimate of survival function, otherwise return estimate of cumulative hazard function

Details

To get estimate of survival function take exp(-H(x)) where H(x) is the cumulative hazard rate

Value

The estimate of the cumulative hazard function at a given value of x

Examples

1
2
3
4
x <- c(1.0,1.3,1.5,1.5,2.1,2.1,2.1,2.8)
rs <- RiskSet(x)
plot(function(y) NelsonAalen(y,rs), 0, 3,
     type='s', ylab="H(x)", main="Nelson-Aalen estimate of H(x)")

nathanesau/lmodels documentation built on May 23, 2019, 12:19 p.m.