Hazard rate
estimate_hazard.Rd
Estimate the non-parametric hazard rate for truncated and censored data
Usage
estimate_hazard(
time,
trunc_time = NULL,
status = NULL,
censoring = NULL,
eval_points = NULL,
return_cdf = TRUE
)
Arguments
- time
The vector of event or censoring times.
- trunc_time
The vector of left-truncation times. Defaults to NULL (no truncation), which is equivalent to a vector of zeros.
- status
The event indicator vector (1=event, 0=censored). Defaults to NULL (no censoring), which is equivalent to a vector of ones.
- censoring
An indicator for censoring (1=censored, 0=not). Defaults to a vector of 0s if
NULL
. An observation is only treated as an event if status=1 AND censoring=0.- eval_points
A
vector
of time points at which to evaluate the hazard. IfNULL
(the default), it is calculated for a sequence fromdelta + 1
todelta + m
.- return_cdf
A
boolean
indicator on whether to return the estimated CDF associated to the hazard rate or not. Default isTRUE