R/powMCTInterim.R
powMCTInterim.RdCalculates the predictive or conditional power for a multiple contrast test based on
interim data, e.g. for a futility interim analysis. This function can also be applied
to longitudinal endpoints, where at the time of interim analysis incomplete data is
available. For more details see the vignette on longitudinal data analysis with
MCP-Mod: vignette("Longitudinal Data MCP-Mod", package = "DoseFinding").
powMCTInterim(
contMat,
mu_0t,
S_0t,
S_01,
alpha = 0.025,
type = c("predictive", "conditional"),
mu_assumed = NULL,
alternative = c("one.sided", "two.sided"),
control = mvtnorm.control()
)Contrast matrix to use. The individual contrasts should be saved in the columns of the matrix
The first stage estimates
The covariance matrix for the first stage estimates
The covariance matrix anticipated for the estimates at study end
Significance level to use
Whether predictive power (for a flat prior) or conditional power should be calculated. For conditional power mu_assumed needs to be specified.
Mean vector to assume for the second stage (only used when type is
conditional). If NULL (default), the first stage estimates mu_0t are used.
Character determining the alternative for the multiple contrast trend test.
A list specifying additional control parameters for the pmvnorm calls in the code, see also mvtnorm.control for details.
Numeric containing the calculated power values
Bornkamp, B., Zhou, J., Xi, D. and Cao W. (2025). Futility analyses for the MCP-Mod methodology based on longitudinal models, arXiv:2406.19965
# Setup the scenario.
doses <- c(0, 0.5, 1, 2, 4, 8)
mods <- Mods(
emax = c(0.5, 1, 2, 4),
sigEmax = rbind(c(0.5, 3), c(1, 3), c(2, 3), c(4, 3)),
quadratic = -0.1,
doses = doses
)
w <- c(1, 0.5, 0.5, 0.5, 1, 1)
contMat <- optContr(models = mods, w = w)$contMat
sigma <- 0.3
n_final <- round(531 * w / sum(w))
n <- floor(n_final / 2)
S_0t <- diag(sigma^2 / n)
S_01 <- diag(sigma^2 / n_final)
## assumed interim estimate
mu_0t <- 0.05 * doses / (doses + 1) + rnorm(6, 0, 0.382 / sqrt(n))
## assumed mu (needed for conditional power)
mu_assumed <- 0.135 * doses / (doses + 1)
# Calculate predictive and conditional power.
powMCTInterim(
contMat = contMat, S_0t = S_0t, S_01 = S_01, mu_0t = mu_0t,
type = "predictive"
)
#> [1] 0.6973523
#> attr(,"error")
#> [1] 0.0003906307
#> attr(,"msg")
#> [1] "Normal Completion"
powMCTInterim(
contMat = contMat, S_0t = S_0t, S_01 = S_01, mu_0t = mu_0t,
type = "conditional", mu_assumed = mu_assumed
)
#> [1] 0.8650528
#> attr(,"error")
#> [1] 0.0001563329
#> attr(,"msg")
#> [1] "Normal Completion"
powMCTInterim(
contMat = contMat, S_0t = S_0t, S_01 = S_01, mu_0t = mu_0t,
type = "predictive", alternative = "two.sided"
)
#> [1] 0.6959777
#> attr(,"error")
#> [1] 0.0004569151
#> attr(,"msg")
#> [1] "Normal Completion"
powMCTInterim(
contMat = contMat, S_0t = S_0t, S_01 = S_01, mu_0t = mu_0t,
type = "predictive", control = mvtnorm.control(maxpts = 1e5)
)
#> [1] 0.6974567
#> attr(,"error")
#> [1] 0.0003386685
#> attr(,"msg")
#> [1] "Normal Completion"