Skip to contents

Area under the Kaplan-Meier curve up to tau, RMST(tau) = integral_0^tau S(t) dt, with the variance of Klein and Moeschberger (2003) eq. (4.5.4).

Usage

Rmst(time, event, tau = NULL, alpha = 0.05)

morie_survival_rmst(time, event, tau = NULL, alpha = 0.05)

Arguments

time

observed follow-up times.

event

event indicator, 1 = event, 0 = censored.

tau

restriction horizon; defaults to the largest observed event time.

alpha

significance level for the interval.

Value

list with the RMST, its standard error, the confidence interval and the horizon used.

References

Klein, J. P. and Moeschberger, M. L. (2003). Survival Analysis, 2nd ed., Springer, eq. (4.5.4).

Examples

Rmst(time = c(1, 2, 3, 4, 5, 6, 7, 8), event = c(0, 1, 0, 1, 1, 0, 1, 0))
#> $rmst
#> [1] 5.685714
#> 
#> $se
#> [1] 0.8298091
#> 
#> $variance
#> [1] 0.6885831
#> 
#> $tau
#> [1] 8
#> 
#> $lower
#> [1] 4.059318
#> 
#> $upper
#> [1] 7.31211
#> 
#> $max_time
#> [1] 8
#> 
#> $max_event_time
#> [1] 7
#> 
#> $tau_beyond_data
#> [1] FALSE
#> 
#> $tau_beyond_last_event
#> [1] TRUE
#> 
#> $n
#> [1] 8
#> 
#> $n_events
#> [1] 4
#> 
#> $method
#> [1] "Klein and Moeschberger (2003) eq. (4.5.4); area under the Kaplan-Meier curve"
#>