Free Access Week-  Data Engineering + BI
Data engineering and BI courses are free!
Free AI Access Week from June 2-8

PWEALL (version 1.3.0.1)

pwefvplus: A utility functon

Description

This will calculate the more complex integration accounting for crossover

Usage

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)

Value

f0

values when k=0

f1

values when k=1

f2

values when k=2

Arguments

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

rate5

additional piecewise constant

rate6

piecewise constant event rate for 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 and tchange must have the same length.

type

type of the crossover, markov, semi-markov and hybrid

rp2

re-randomization prob

eps

tolerance

Author

Xiaodong Luo

Details

Let h1,,h6 correspond to rate1,...,rate6, and H1,,H6 be the corresponding survival functions. Also let π2=\coderp2. when type=1, we calculate 0tskh2(s)H2(s)H6(s)0sh3(u)H1(u)H3(u)/H2(u)duds; when type=2, we calculate 0tskH6(s)0sh3(u)H1(u)H3(u)h2(su)H2(su)duds; when type=3, we calculate the sum of π20tskH41π2(s)H6(s)0sh3(u)H1(u)H3(u)h2(su)H2π2(su)/H41π2(u)duds and (1π2)0tskh4(s)H41π2(s)H6(s)0sh3(u)H1(u)H3(u)H2π2(su)/H41π2(u)duds; when type=4, we calculate the sum of π20tskH6(s)0sh3(u)H1(u)H3(u)h2(su)H2(su)duds and (1π2)0tskh4(s)H4(s)H6(s)0sh3(u)H1(u)H3(u)/H4(u)duds; when type=5, we calculate the sum of π20tskH6(s)0sh3(u)H1(u)H3(u)h2(su)H2(su)duds and (1π2)0tskH6(s)0sh3(u)H1(u)H3(u)h4(su)H4(su)duds.

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>.

See Also

rpwe

Examples

Run this code
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