nonparam_rmst {reconstructKM}R Documentation

Calculate RMST for each arm as well as contrast

Description

Non-parametric RMST function that allows for the tau (follow-up time) to be arbitrarily large. Uno package restricts it to be min(last observed event in either arm). Provides estimate, SE, CI for each arm. Provides same for difference in arms (and also p-value).

Usage

nonparam_rmst(dat, tau, alpha = 0.05)

Arguments

dat

Data frame of time-to-event data which MUST have the columns 'time', 'arm', and 'status

tau

How long of a follow-up to consider, i.e. we integrate the survival functions from 0 to tau

alpha

Confidence interval is given for (alpha/2, 1-alpha/2) percentiles

Value

A list including data.frame of results in each arm (RMST, RMTL, SE, pvalue, CI) as well as data.frame of results for Arm1 - Arm0 RMST.

Examples

time <- rnorm(100)
status <- rbinom(n=100, size=1, prob=0.5)
arm <- c( rep(1, 50), rep(0, 50))
dat <- data.frame(time=time, status=status, arm=arm)
nonparam_rmst(dat=dat, tau=1, alpha=0.05)


[Package reconstructKM version 0.3.0 Index]