Skip to contents

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. If NULL (the default), it is calculated for a sequence from delta + 1 to delta + m.

return_cdf

A boolean indicator on whether to return the estimated CDF associated to the hazard rate or not. Default is TRUE

Value

A data.frame with the hazard estimate their standard errors and asymptotic confidence intervals.

Details

Point estimate and asymptotic confidence intervals are calculated based on (We can also include some brief notation/definitions here)