Learn R Programming

survMisc (version 0.4.2)

survEst: Estimates of survival functions based on n and e

Description

Estimates of survival functions based on n and e

Usage

survEst(n, e)

  KM(n, e)

  Gw(n, e)

  NelA(n, e)

  NelAVar(n, e)

Arguments

n
Vector with corresponding no. at risk at time points
e
Vector with no. events (e.g. deaths) at time points

Value

  • KM returns $\hat{S}$, the Kaplan-Meier estimator Gw returns $Var [\hat{S}(t)]$, the variance of the Kaplan-Meier estimator NelA returns $\hat{H}(t)$, the Nelson-Aalen estimator NelAV returns $Var \hat{H}(t)$, the variance of the Nelson-Aalen estimator

Details

KM gives the Kaplan-Meier (product-limit) estimator of survival function. Value is $1$ at $t=0$ and thereafter given by: $$\prod_{t \leq t_i} (1-\frac{e_i}{n_i} )$$ Gw gives Greenwoods estimtor of the Kaplan-Meier (product-limit) estimator of survival function is given by: $$Var[\hat{S}(t)] = [\hat{S}(t)]^2 \sum_{t_i \leq t} \frac{e_i}{n_i (n_i-e_i)}$$ NelA gives the Nelson Aalen estimator of hazard function. Value is $\hat{H}=0$ at $t=0$ and thereafter given by: $$\hat{H}(t) = \sum_{t \leq t_i} \frac{e_i}{n_i}$$ NelAVar gives the variance of the Nelson-Aalen estimator, given by: $$Var[\hat{H}(t))] = \sum_{t_i \leq t} \frac{e_i}{n_i^2}$$

References

Last example for Gw is from: Klein J, Moeschberger M 2003 Survival Analysis, 2nd edition. New York: Springer. Table 4.1A, pg 93. Example for NelAVar is from: Klein J, Moeschberger M 2003 Survival Analysis, 2nd edition. New York: Springer. Table 4.2, pg 94.

Examples

Run this code
data(bmt, package="KMsurv")
b1 <- bmt[bmt$group==1, ] # ALL patients
s1 <- Surv(time=b1$t2, event=b1$d3)
t1 <- tne(s1)
KM(n=t1$n, e=t1$e)
###
data(bmt, package="KMsurv")
b1 <- bmt[bmt$group==1, ] # ALL patients
s1 <- Surv(time=b1$t2, event=b1$d3)
t1 <- tne(s1)
Gw(n=t1$n, e=t1$e)
data(drug6mp, package="KMsurv")
s1 <- Surv(time=drug6mp$t2, event=drug6mp$relapse) # 6MP patients
t1 <- tne(s1)
Gw(n=t1$n, e=t1$e)
###
data(bmt, package="KMsurv")
b1 <- bmt[bmt$group==1, ] # ALL patients
s1 <- Surv(time=b1$t2, event=b1$d3)
t1 <- tne(s1)
NelA(e=t1$e, n=t1$n)
###
data(drug6mp, package="KMsurv")
s1 <- Surv(time=drug6mp$t2, event=drug6mp$relapse) # 6MP patients
t1 <- tne(s1)
NelAVar(n=t1$n, e=t1$e)

Run the code above in your browser using DataLab