fourhr | R Documentation |
This will calculate the more complex integration
fourhr(t=seq(0,5,by=0.5),rate1=c(0,5,0.8),rate2=rate1,
rate3=c(0.1,0.2),rate4=rate2,tchange=c(0,3),eps=1.0e-2)
t |
A vector of time points |
rate1 |
piecewise constant event rate |
rate2 |
piecewise constant event rate |
rate3 |
piecewise constant event rate |
rate4 |
additional piecewise constant |
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 and tchange must have the same length. |
eps |
tolerance |
Let h_1,\ldots,h_4
correspond to rate1
,...,rate4
, and H_1,\ldots,H_4
be the corresponding survival functions.
We calculate
\int_0^t h_1(s)H_2(s)h_3(t-s)H_4(t-s)ds.
fx |
values |
This provides the result of the complex integration
Xiaodong Luo
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)
tchange<-c(0,1.75)
fourhrfun<-fourhr(t=seq(0,5,by=0.5),rate1=r1,rate2=r2,rate3=r3,
rate4=r4,tchange=c(0,3),eps=1.0e-2)
fourhrfun
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.