This will calculate the more complex integration accounting for crossover
pwefvplus(t=seq(0,5,by=0.5),rate1=c(0,5,0.8),rate2=rate1,
rate3=c(0.1,0.2),rate4=rate2,rate5=rate2,
rate6=c(0.5,0.3),tchange=c(0,3),type=1,
rp2=0.5,eps=1.0e-2)
values when
values when
values when
A vector of time points
piecewise constant event rate
piecewise constant event rate
piecewise constant event rate
additional piecewise constant
additional piecewise constant
piecewise constant event rate for censoring
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 and tchange must have the same length.
type of the crossover, markov, semi-markov and hybrid
re-randomization prob
tolerance
Xiaodong Luo
Let rate1
,...,rate6
, and type
=1, we calculate
type
=2, we calculate
type
=3, we calculate the sum of
type
=4, we calculate the sum of
type
=5, we calculate the sum of
Luo et al. (2018) Design and monitoring of survival trials in complex scenarios, Statistics in Medicine <doi: https://doi.org/10.1002/sim.7975>.
rpwe
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)
r6<-c(0.4,0.5)
tchange<-c(0,1.75)
pwefun<-pwefvplus(t=seq(0,5,by=0.5),rate1=r1,rate2=r2,rate3=r3,
rate4=r4,rate5=r5,rate6=r6,
tchange=c(0,3),type=1,eps=1.0e-2)
pwefun
Run the code above in your browser using DataLab