cal_event {nphPower} | R Documentation |
Event Rate Calculation
Description
Calculate the event rate given the hazards and drop-out distribution parameters
Usage
cal_event(ratio, lambda1, lambda0, entry, fup, l_shape, l_scale)
Arguments
ratio |
allocation ratio |
lambda1 |
hazard rate for treatment group |
lambda0 |
hazard rate for control group |
entry |
enrollment period time |
fup |
follow-up period time |
l_shape |
shape parameter of weibull distribution for drop-out |
l_scale |
scale parameter of weibull distribution for drop-out |
Details
The event rate is calculated based on the following assumptions: 1)
patients are uniformly enrolled within entry
time; 2) survival
times for treatment and control are from exponential distribution; 3)
the drop-out times for treatment and control follow the weibull distribution.
The final rate is obtained via numeric integration:
P=\int_{t_{fup}}^{t_{enrl}+t_{fup}} \Big \{
\int_0^{t}r(u)exp\big [-\int_0^u[r(x)+l(x)]dx \big]d(u) \Big \}
\frac{1}{t_{enrl}} dt
where r(x)
is the hazard of event and l(x)
is the hazard
of drop-out; t_{enrl}
is the entry time and t_{fup}
is the
follow-up duration.
Value
a list of components:
ep1 |
event rate for treatment group |
ep0 |
event rate for control group |
ep |
mean event rate weighted by the randomization ratio |
Examples
# median survival time for treatment and control: 16 months vs 12 months
# entry time: 12 months ; follow-up time: 18 months
# the shape parameter for weibull drop-out : 0.5
# median time for drop-out : 48 =>
# scale parameter: 48/log(2)^(1/0.5)=100
RR <- 1; l1 <- log(2)/16; l0 <- log(2)/12
t_enrl <- 12; t_fup <- 18
cal_event(1,l1,l0,t_enrl,t_fup,0.5,100)