pwefv2: A utility function

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

This will $int_0^t s^k lambda_1(s)S_2(s)ds$ where k=0,1,2 and rate1=lambda_1 and S_2 has hazard rate2

Usage

1
2
pwefv2(t=seq(0,5,by=0.5),rate1=c(0,5,0.8),
      rate2=rate1,tchange=c(0,3),eps=1.0e-2)

Arguments

t

A vector of time points

rate1

piecewise constant event rate

rate2

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 and tchange must have the same length.

eps

tolerance

Details

Let h_1,h_2 correspond to rate1,rate2, and H_1,H_2 be the corresponding survival functions. This function will calculate

\int_0^t s^k h_1(s)H_2(s)ds,\hspace{1cm} k=0,1,2.

Value

f0

values when k=0

f1

values when k=1

f2

values when k=2

Note

This will provide the number of events.

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

See Also

rpwe

Examples

1
2
3
4
5
6
r1<-c(0.6,0.3)
r2<-c(0.6,0.6)
tchange<-c(0,1.75)
pwefun<-pwefv2(t=seq(0,5,by=0.5),rate1=r1,rate2=r2,
              tchange=tchange,eps=1.0e-2)
pwefun

PWEALL documentation built on May 2, 2019, 4:16 a.m.

Related to pwefv2 in PWEALL...