rrml: Restricted residual mean life

Description Usage Arguments Value Author(s) Examples

View source: R/rrml.R

Description

Computes the restricted residual mean life for both treatment arms.

Usage

1
rrml(obj, t0, t1, tau0 = NULL, tau1 = NULL)

Arguments

obj

An object of class surv.delay

t0

The lower trunctation time in the control arm.

t1

The lower trunctation time in the active treatment arm.

tau0

The upper trunctation time in the control arm.

tau1

The upper trunctation time in the active treatment arm.

Value

A list with the following two components

rrml0

The restricted residual mean life in the control arm

rrml1

The restricted residual mean life in the active treatment arm

Author(s)

Nicholas Henderson

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Not run: 
### Generate simulated survival data
n <- 400
cens.time <- 8
X1 <- rweibull(n, shape=2.3, scale=7)
X2 <- rweibull(n, shape=.8, scale=10)
Y1 <- pmin(X1, cens.time)
Y2 <- pmin(X2, cens.time)
e1 <- as.numeric(X1 < cens.time)
e2 <- as.numeric(X2 < cens.time)

times <- c(Y1, Y2)  ## follow-up times
events <- c(e1, e2) ## event indicators
trt <- rep(c(0,1), each=n)  ## treatment arm assignment

dfs.obj <- DelayedSurvFit(times, events, trt, max.times=50) 
rrml(dfs.obj, t0=3, t1=3)

## End(Not run)

nchenderson/DelayedSurvFit documentation built on Jan. 21, 2021, 9:15 a.m.