The return value will be a vector
,
unless what="all"
(the default),
in which case it will be a data.table
.
If what="s"
, the survival is returned, based on the
Kaplan-Meier or product-limit estimator.
This is $1$ at $t=0$ and thereafter is given by:
$$\hat{S}(t) = \prod_{t \leq t_i} (1-\frac{e_i}{n_i} )$$If what="sv"
, the survival variance is returned.
Greenwoods estimtor of the variance of the Kaplan-Meier (product-limit)
estimator is:
$$Var[\hat{S}(t)] = [\hat{S}(t)]^2 \sum_{t_i \leq t} \frac{e_i}{n_i (n_i-e_i)}$$
If what="h"
, the hazard is returned, based on the the Nelson-Aalen estimator.
This has a value of $\hat{H}=0$ at $t=0$ and thereafter is given by:
$$\hat{H}(t) = \sum_{t \leq t_i} \frac{e_i}{n_i}$$
If what="hv"
, the hazard variance is returned.
The variance of the Nelson-Aalen estimator is given by:
$$Var[\hat{H}(t)] = \sum_{t_i \leq t} \frac{e_i}{n_i^2}$$
If what="all"
(the default), all of the above are returned
in a data.table
, along with:
Survival, based on the Nelson-Aalen estimator. Given by
$$\hat{S_{na}}=e^{H}$$
where $H$ is hazard.
HKM Hazard, based on the Kaplan-Meier estimator. Given by
$$\hat{H_{km}}=-\log{S}$$
where $S$ is survival.