Method2 | R Documentation |
Calculate boundaries for a group sequential design with delayed endpoints based planned information using an error spending approach.
Method2(
rho_alpha = 2,
rho_beta = 2,
alpha = 0.025,
beta = 0.2,
Kmax,
Info.max = NULL,
InfoR.i = NULL,
InfoR.d = NULL,
delta = 0,
abseps = 1e-06,
alternative = "greater",
binding = TRUE,
Trace = FALSE,
nWhileMax = 30,
toldiff = 1e-05,
tolcoef = 1e-04,
mycoefMax = 1.2,
mycoefL = 1,
myseed = 2902,
cMin = -Inf
)
rho_alpha |
rho parameter of the rho-family spending functions (Kim-DeMets) for alpha |
rho_beta |
rho parameter of the rho-family spending functions (Kim-DeMets) for beta |
alpha |
type I error |
beta |
type II error |
Info.max |
maximum information needed for given beta (type II-error), delta (expected difference), alpha (type I-error) and Kmax. It can be given if it is known. Otherwise it is computed from the values given for alpha, beta, delta and Kmax. |
InfoR.i |
Expected or observed (wherever possible) information rates at the interim analyses 1:(Kmax-1) |
InfoR.d |
Expected or observed information rates at all potential decision analyses and final analyses 1:Kmax |
delta |
expected effect under the alternative (should be on the scale of the test statistc for which If and Info.max relate to one over the variance, e.g. delta=expected log(Hazard ratio)) |
abseps |
tolerance for precision when finding roots or computing integrals |
alternative |
a character string specifying the alternative hypothesis, |
binding |
whether we assume binding futility boundaries |
Trace |
Used only if Info.max=NULL. Whether to print informations to follow the progression of the (root finding) algorithm to compute Info.max (from alpha, beta, delta and Kmax). |
nWhileMax |
Used only if Info.max=NULL. Maximum number of steps in the (root finding) algorithm to compute Info.max (from alpha, beta, delta and Kmax) |
toldiff |
Used only if Info.max=NULL. Maximum tolerated difference between lower and upper bounds at anaylis Kmax (which souhld be zero), in the root finding algorithm, to find the value of Info.max |
tolcoef |
Used only if Info.max=NULL. Maximum tolerated difference before stopping the search (in the root finding algorithm), between two successive values for the multiplier coeficient 'coef' such that Info.max=coef*If (some values for coef are given in Table 7.6 page 164 Jennison's book. The value of "If" (which stands for Information for Fixed design) corresponds to the information we need if Kmax=1) |
mycoefMax |
Used only if Info.max=NULL. Upper limit of the interval of values in which we search for the multiplier coeficient 'coef' such that Info.max=coef*If (in the root finding algorithm). |
mycoefL |
Used only if Info.max=NULL. Lower limit of the interval (see mycoefMax) |
myseed |
seed for producing reproducible results. Because we call functions which are based on Monte-Carlo compuation (pmvnorm) |
cMin |
minimun possible value c for the decision analysis, typically that for a fixed sample test (H & J page 10) |
kMax |
max number of analyses (including final) |
Example to check that code matches
b1 <- CalcBoundaries(kMax=2, #max number of analyses (including final)
alpha=0.025, #type I error
beta=0.2, #type II error
InfoR.i=c(0.6,1), #planned information rates
rho_alpha=2, #rho parameter for alpha error spending function
rho_beta=2, #rho parameter for beta error spending function
method=1, #use method 1 or 2 from paper H&J
delta=1.5, #effect that the study is powered for
InfoR.d=0.65,
bindingFutility=TRUE)
b12 <- Method2(Kmax=2,Info.max=b1$Info.max,delta=1.5,alpha=0.025,InfoR.i=c(0.6,1),InfoR.d=0.65)
b1FT <- CalcBoundaries(kMax=2, #max number of analyses (including final)
alpha=0.025, #type I error
beta=0.2, #type II error
InfoR.i=c(0.6,1), #planned information rates
rho_alpha=2, #rho parameter for alpha error spending function
rho_beta=2, #rho parameter for beta error spending function
method=1, #use method 1 or 2 from paper H&J
delta=1.5, #effect that the study is powered for
InfoR.d=0.65,
bindingFutility=TRUE)
b12FT <- Method2(Kmax=2,Info.max=b1FT$Info.max,delta=1.5,binding=TRUE,alpha=0.025,InfoR.i=c(0.6,1),InfoR.d=0.65)
b12FTNoImax <- Method2(Kmax=2,Info.max=NULL,delta=1.5,binding=TRUE,alpha=0.025,InfoR.i=c(0.6,1),InfoR.d=0.65)
all.equal(b1$uk, b12$boundaries[,"b.k"])
all.equal(b1$lk, b12$boundaries[,"a.k"])
b13 <- Method2(Kmax=2,delta=1.5,alpha=0.025,Trace=T,InfoR.i=c(0.6,1))
b14nb <- Method2(Kmax=2,delta=1.5,alpha=0.025,Trace=T,InfoR.i=c(0.6,1),InfoR.d=0.65,binding=F)
b14b <- Method2(Kmax=2,delta=1.5,alpha=0.025,Trace=T,InfoR.i=c(0.6,1),InfoR.d=0.65,binding=T)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.