View source: R/gridFinalPvalue.R
gridFinalPvalue | R Documentation |
Evaluate the p-value over stages and test statistics, following armitage ordering (Armitage 1957).
gridFinalPvalue(
object,
continuity.correction,
seq.futility = c(-3, 0),
seq.kMax = c(-3, 1, 3, 6),
seq.efficacy = c(2.5, 3.25, 4, 5),
plot = TRUE,
col = NULL,
title = NULL,
xlim = NULL,
pch = 20,
cex = 2,
lwd = 2,
digits = 2
)
object |
|
continuity.correction |
[logical] whether to add the probability of stopping between ck and ck.uncorrected to ensure continuity of the p-value across stages. When used the p-value will always be greater than this probability of stopping bettwen ck and ck.uncorrected. |
a data.frame
containing
k
the stage
z
the test statistic value
p.value
the p-value
P. Armitage, Restricted sequential procedures. Biometrika 1957 (9-56)
## 2 stages, no fixC
myBound2 <- CalcBoundaries(kMax = 2,
alpha = 0.025,
beta = 0.2,
InfoR.i = c(0.55, 1.00),
InfoR.d = c(0.62, 1),
rho_alpha = 2,
rho_beta = 2,
method = 1,
cNotBelowFixedc = FALSE,
bindingFutility= TRUE,
delta = 0.6)
grid.p2 <- gridFinalPvalue(myBound2)
grid.p2
## 2 stages, fixC
myBound2.fixC <- CalcBoundaries(kMax = 2,
alpha = 0.025,
beta = 0.2,
InfoR.i = c(0.55, 1.00),
InfoR.d = c(0.62, 1),
rho_alpha = 2,
rho_beta = 2,
method = 1,
cNotBelowFixedc = TRUE,
bindingFutility= TRUE,
delta = 0.6)
gridFinalPvalue(myBound2.fixC,
continuity.correction = 0)
gridFinalPvalue(myBound2.fixC,
continuity.correction = 1)
gridFinalPvalue(myBound2.fixC,
continuity.correction = 2)
## 3 stages, no fixC
myBound3 <- CalcBoundaries(kMax = 3,
alpha = 0.025,
beta = 0.2,
InfoR.i = c(0.45, 0.65, 1.00),
InfoR.d = c(0.52, 0.72, 1),
rho_alpha = 2,
rho_beta = 2,
method = 1,
cNotBelowFixedc = FALSE,
bindingFutility= TRUE,
delta = 0.6)
grid.p3 <- gridFinalPvalue(myBound3)
grid.p3
## 3 stages, fixC
myBound3.fixC <- CalcBoundaries(kMax = 3,
alpha = 0.025,
beta = 0.2,
InfoR.i = c(0.45, 0.65, 1.00),
InfoR.d = c(0.52, 0.72, 1),
rho_alpha = 2,
rho_beta = 2,
method = 1,
cNotBelowFixedc = TRUE,
bindingFutility= TRUE,
delta = 0.6)
gridFinalPvalue(myBound3.fixC, digits = 3,
continuity.correction = 0)
gridFinalPvalue(myBound3.fixC, digits = 3,
continuity.correction = 1)
gridFinalPvalue(myBound3.fixC, digits = 3,
continuity.correction = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.