Description Usage Arguments Value Examples
Consider the general testing framework: At analysis i, the test is max(WLR_1, ..., WLR_ni). This function calculates the rejection boundary in z value for each analysis with the alpha allocation is given. The calculation is based on the asymptotic multivariate normal distribution. So it can be a challenge if the number of dimensions is large, in which case one can use simulation approach with a large number of draws like 100 million in order to achieve high precision.
1 2 3 4 5 6 7 8 9 10 11 12 13 | wlr.Zbd(
DCO = c(24, 36, 48),
r = 1,
alpha = c(0.01, 0.02, 0.02)/2,
h0 = function(t) { log(2)/12 },
S0 = function(t) { exp(-log(2)/12 * t) },
h1 = function(t) { log(2)/12 * 0.7 },
S1 = function(t) { exp(-log(2)/12 * 0.7 * t) },
f.ws = list(IA1 = list(lr), IA2 = list(lr, fh11), FA = list(lr, fh01, fh11)),
Lambda = function(t) { (t/18)^1.5 * as.numeric(t <= 18) + as.numeric(t > 18) },
G0 = function(t) { 0 },
G1 = function(t) { 0 }
)
|
DCO |
Analysis time. |
r |
Randomization ratio of experimental arm : control arm as r:1. When r = 1, it is equal allocation. Default r = 1. |
alpha |
A vector of allocated alpha levels for interim and final analyses. sum(alpha) = 0.025 (1-sided). |
h0 |
Hazard function of control arm. |
S0 |
Survival function of control arm. |
h1 |
Hazard function of experimental arm. |
S1 |
Survival function of experimental arm. |
f.ws |
Weight functions used for each analysis. For example (1), if there are 3 analyses planned including IA1, IA2, and FA. IA1 uses log-rank test, IA2 uses a maxcombo test of (logrank, FH01), and FA uses a maxcombo test of (logrank, FH01, FH11). Then specify as f.ws = list(IA1=list(lr), IA2=list(lr, fh01), FA=list(lr, fh01, fh11)), where define lr = function(s)1; fh01=function(s)1-s; fh11 = function(s)s*(1-s); For example (2), if only fh01 is used for all three analyses IA1, IA2 and FA. f.ws = list(IA1=list(fh01), IA2=list(fh01), FA1=list(fh01)). For example (3), if logrank is used in a study design with only one analysis, then f.ws = list(FA=list(lr)). |
Lambda |
Distribution function of enrollment. For example, Lambda(t) = (t/A)^psi*I(0<=t<=A) + I(t>A) for enrollment in (0, A) with weight psi. |
G0 |
Cumulative distribution function of drop-off for control arm, eg, G.ltfu=function(t)1-exp(-0.03/12*t) is the distribution function for 3 percent drop-off in 12 months of followup. |
G1 |
Cumulative distribution function of drop-off for experimental arm. |
cov: Asymptotic covariance matrix, also correlation matrix under H0.
bd: A vector of rejection boundaries for all analyses.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | m0 = 12; #median RFS for control arm
lam0 = log(2) / m0
h0 = function(t){lam0};
S0 = function(t){exp(-lam0 * t)}
HRd = 0.60 #hazard ratio after delay
h.D6=function(t){lam0*as.numeric(t<6)+HRd*lam0*as.numeric(t>=6)}
c6 = exp(-6*lam0*(1-HRd));
S.D6 = function(t){exp(-lam0*t)*as.numeric(t<6)+c6*exp(-HRd*lam0*t)*as.numeric(t>=6)}
f.logHR.D6 = function(t){log(as.numeric(t<6) + as.numeric(t>= 6)*HRd)}
#Define weight functions for weighted log-rank tests
lr = function(s){1}
fh01 = function(s){(1-s)}
fh11 = function(s){s*(1-s)}
#modestly log-rank
mfh01 = function(s){s1 = apply(cbind(s, 0.5), MARGIN=1,FUN=max); return(1/s1)}
#Define the testing strategy
test.IA1 = list(lr)
test.IA2 = list(lr, fh11)
test.IA3 = list(lr, fh01, fh11)
Lambda = function(t){(t/18)^1.5*as.numeric(t <= 18) + as.numeric(t > 18)}
G0 = G1 = function(t){0}
wlr.Zbd(DCO = c(24, 36, 48), r = 1, alpha=c(0.01, 0.02, 0.02)/2,
h0 = h0, S0 = S0, h1 = h.D6, S1 = S.D6,
f.ws = list(IA1=test.IA1, IA2=test.IA2, FA=test.IA3),
Lambda = Lambda, G0 = G0, G1 = G1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.