redist: Calculation of Efron's re-distribution to the right algorithm...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/redist.R

Description

Calculation of Efron's re-distribution to the right algorithm to obtain the Kaplan-Meier estimate.

Usage

1
redist(time, status)

Arguments

time

A numeric vector of event times.

status

The event status vector takes the value 1 for observed events and the value 0 for right censored times.

Value

Calculations needed to

Author(s)

Thomas A. Gerds <tag@biostat.ku.dk>

See Also

prodlim

Examples

1
redist(time=c(.35,0.4,.51,.51,.7,.73),status=c(0,1,1,0,0,1))

Example output

Kaplan-Meier estimate via re-distribution to the right algorithm:

Subject 1:
---------------------------
Survival before = 100%
No event until time = 0.35
Re-distribute mass 0.17 to remaining 5 subjects
Survival after = 100%

Subject 2:
---------------------------
Survival before = 100%
Event at time = 0.4
Contribution to Kaplan-Meier estimate:

                 fractions decimal
own contribution 1/6       0.16667
from subject 1   1/6*1/5   0.03333
                 sum       0.2000 

Survival after = 100% - (1/6 + 1/6*1/5)
               = 100% - 20% = 80%

Subject 3:
---------------------------
Survival before = 80%
Event at time = 0.51
Contribution to Kaplan-Meier estimate:

                 fractions decimal
own contribution 1/6       0.16667
from subject 1   1/6*1/5   0.03333
                 sum       0.2000 

Survival after = 80% - (1/6 + 1/6*1/5)
               = 80% - 20% = 60%

Subject 4:
---------------------------
Survival before = 60%
No event until time = 0.51
Re-distribute mass 0.2 to remaining 2 subjects
Survival after = 60%

Subject 5:
---------------------------
Survival before = 60%
No event until time = 0.7
Re-distribute mass 0.3 to remaining 1 subject
Survival after = 60%

Subject 6:
---------------------------
Survival before = 60%
Event at time = 0.73
Contribution to Kaplan-Meier estimate:

                 fractions       decimal
own contribution 1/6             0.16667
from subject 1   1/6*1/5         0.03333
from subject 4   1/6*1/2         0.08333
                 1/6*1/5*1/2     0.01667
from subject 5   1/6*1/1         0.16667
                 1/6*1/5*1/1     0.03333
                 1/6*1/2*1/1     0.08333
                 1/6*1/5*1/2*1/1 0.01667
                 sum             0.6000 

Survival after = 60% - (1/6 + 1/6*1/5 + 1/6*1/2 + 1/6*1/5*1/2 + 1/6*1/1 + 1/6*1/5*1/1 + 1/6*1/2*1/1 + 1/6*1/5*1/2*1/1)
               = 60% - 60% = 0%

Summary table:

  time n.risk n.event n.lost surv
1 0.00      6       0      0  100
2 0.35      6       0      1  100
3 0.40      5       1      0   80
4 0.51      4       1      1   60
5 0.70      2       0      1   60
6 0.73      1       1      0    0

prodlim documentation built on Nov. 17, 2019, 5:06 p.m.

Related to redist in prodlim...