rmstutil {PWEALL} | R Documentation |
A utility function to calculate the true restricted mean survival time (RMST) and its variance account for delayed treatment, discontinued treatment and non-uniform entry
Description
A utility function to calculate the true restricted mean survival time (RMST) and its variance account for delayed treatment, discontinued treatment and non-uniform entry
Usage
rmstutil(tcut=2.0,tstudy=5.0,taur=5,u=c(1/taur,1/taur),ut=c(taur/2,taur),
rate1=c(1,0.5),rate2=rate1,rate3=c(0.7,0.4),
rate4=rate2,rate5=rate2,ratec=c(0.5,0.6),
tchange=c(0,1),type=1,rp2=0.5,
eps=1.0e-2,veps=1.0e-2)
Arguments
tcut |
time point at which rmst is calculated |
tstudy |
the study time point from first patient in, it must be not smaller than |
taur |
Recruitment time |
u |
Piecewise constant recuitment rate |
ut |
Recruitment intervals |
rate1 |
piecewise constant event rate before crossover |
rate2 |
piecewise constant event rate after crossover |
rate3 |
piecewise constant event rate for crossover |
rate4 |
additional piecewise constant event rate for more complex crossover |
rate5 |
additional piecewise constant event rate for more complex crossover |
ratec |
Hazard for time to censoring |
tchange |
a strictly increasing sequence of time points starting from zero at which event rate changes. The first element of tchange must be zero. The above rates |
type |
type of crossover, 1=markov, 2=semi-markov, 3=hybrid |
rp2 |
re-randomization probability to receive the rescue treatment when semi-markov crossover occurs. When it happens, the overall hazard will be rp2*r2(t-s)+(1-rp2)*r4(t), where r2 is the hazard for the semi-markov rescue treatment and r4 is hazard for the markov rescue treatment. |
eps |
A small number representing the error tolerance when calculating the utility function
with |
veps |
A small number representing the error tolerance when calculating the variance. |
Details
More details
Value
tcut |
time point at which rmst is calculated |
tstudy |
the study time point from first patient in, it must be not smaller than |
rmst |
rmst at cut-point |
var |
the variance of |
vadd |
the additional variance term of |
Note
This calculates the "true" variance of restricted mean survival times
Author(s)
Xiaodong Luo
References
Luo et al. (2018) Design and monitoring of survival trials in complex scenarios, Statistics in Medicine <doi: https://doi.org/10.1002/sim.7975>.
Examples
r1<-c(0.6,0.3)
r2<-c(0.6,0.6)
r3<-c(0.1,0.2)
r4<-c(0.5,0.4)
r5<-c(0.4,0.5)
rc<-c(0.1,0.1)
rmt<-rmstutil(tcut=2.0,tstudy=5.0,taur=5,
rate1=r1,rate2=r2,rate3=r3,
rate4=r4,rate5=r5,ratec=rc,
tchange=c(0,1),type=1,rp2=0.5,
eps=1.0e-2,veps=1.0e-2)
rmt