pwecxpwu {PWEALL} | R Documentation |
Integration of the density of piecewise exponential distribution with crossover effect, censoring and recruitment function
Description
This will calculate the functions according to the piecewise exponential distribution with crossover
Usage
pwecxpwu(t=seq(0,10,by=0.5),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)
Arguments
t |
a vector of time points |
taur |
recruitment time |
u |
recruitment rate |
ut |
recruitment interval, must have the same length as |
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 |
censoring piecewise constant event rate |
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, i.e. markov, semi-markov and hybrid |
rp2 |
re-randomization prob |
eps |
tolerance |
Details
This is to calculate the function (and its derivative)
\xi(t)=\int_0^t G_E(t-s)\widetilde{f}(s)S_C(s)ds,
where G_E
is the accrual function defined by taur
, u
and ut
, S_C
is the piecewise exponential survival function of the censoring time, defined by tchange
and ratec
, and \widetilde{f}
is the density for the event distribution subject to crossover defined by tchange
, rate1
to rate5
and type
.
Value
du |
the function |
duprime |
its derivative |
Author(s)
Xiaodong Luo
References
Luo, et al. (2017)
See Also
Examples
taur<-2
u<-c(0.6,0.4)
ut<-c(1,2)
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.5,0.6)
exu<-pwecxpwu(t=seq(0,10,by=0.5),taur=taur,u=u,ut=ut,
rate1=r1,rate2=r2,rate3=r3,rate4=r4,rate5=r5,ratec=rc,
tchange=c(0,1),type=1,eps=1.0e-2)
c(exu$du,exu$duprime)