knitr::opts_chunk$set(echo = F, results = "asis")
The trial will be designed to compare an experimental treatment (arm 1) to a control (arm 0), through a group-sequential trial with at most $J$ stages. Response $X_{ijk}$, from patient $i=1,\dots,n_k$, in arm $k=0,1$, in stage $j=1,\dots,J$, will be assumed to be distributed as $X_{ijk} \sim N(\mu_k,\sigma_k^2)$. Then, the hypothesis to be tested will be: $$ H_0 : \tau = \mu_1 - \mu_0 \le 0.$$ The type-I error-rate will be desired to be at most $\alpha$, and the trial will be powered at level $1-\beta$ for the scenario where $\tau=\delta>0$ (the alternative hypothesis $H_1$).
At interim analysis $j=1,\dots,J$, a standardised test statistic $Z_j$ will be compared to efficacy and futility boundaries $e_j$ and $f_j$ respectively.
J <- params$J alpha <- params$alpha beta <- params$beta delta <- params$delta sigma0 <- params$sigma0 sigma1 <- params$sigma1 ratio <- params$ratio shape <- params$shape optimality <- params$optimality quantile_sub <- params$quantile_sub integer_n <- params$integer_n n0 <- params$n0 n1 <- params$n1 e <- params$e f <- params$f opchar <- params$opchar plots <- params$plots estimators <- params$estimators
if (shape == "haybittle_peto") { shape_text <- "Haybittle-Peto" } else if (shape == "near_optimal") { shape_text <- "Near-optimal" } else if (shape == "power_family") { shape_text <- "Power-family" } else if (shape == "triangular") { shape_text <- "Triangular-test" } else if (shape == "wang_tsiatis") { shape_text <- "Wang-Tsiatis" } else if (shape == "obrien_fleming") { shape_text <- "O'Brien-Fleming" } else if (shape == "pocock") { shape_text <- "Pocock" } if (shape == "near_optimal") { if (optimality == "null_optimal") { optimality_text <- "be to minimise the expected sample size under the null" } else if (optimality == "alt_optimal") { optimality_text <- "be to minimise the expected sample size under the alternative" } else if (optimality == "delta_minimax") { optimality_text <- "be to minimise the maximum expected sample size" } else if (optimality == "balanced") { optimality_text <- "be a balanced near-optimal design" } } else { optimality_text <- "not be used (i.e., a non-optimised design has been chosen)" } if (quantile_sub) { quantile_sub_text <- "will" } else { quantile_sub_text <- "will not" } if (integer_n) { integer_n_text <- "will" } else { integer_n_text <- "will not" } if (plots) { plot_text <- "will" } else { plot_text <- "will not" } if (estimators) { estimator_text <- "will" } else { estimator_text <- "will not" }
The following choices were made:
r J
}$ stages will be allowed in the trial.r alpha
}$.r beta
}$.r delta
}$.r sigma0
}$.r sigma1
}$.r ratio
)}$.r shape_text
boundaries will be calculated.r optimality_text
.r integer_n_text
be used.r integer_n_text
be required to be an integer.r plot_text
be produced.r estimator_text
be evaluated (currently only available for two-stage designs).typeI <- round(opchar[1, 2], 3) typeII <- round(1 - opchar[3, 2], 3) e_text <- paste0("(", paste(round(e, 3), collapse = ", "), ")") f_text <- paste0("(", paste(round(f, 3), collapse = ", "), ")")
r round(n0, 3)
}$.r round(n1, 3)
}$.r typeI
}$.r typeII
}$.r e_text
}$.r f_text
}$.Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.