Editverse Free Calculator
Interim Analysis Calculator (O’Brien-Fleming and Pocock Boundaries)
Compute two-sided O’Brien-Fleming or Pocock efficacy boundaries for 2 to 8 equally spaced analyses, keeping the overall type I error at your chosen alpha, with the R command behind the result. Futility boundaries, unequally spaced looks (alpha-spending) and sample size are outside this tool. A full guide follows below. Validated against R 4.3.3.
In Simple Words
Looking at trial data repeatedly and testing each time inflates the chance of a false-positive result. Group-sequential boundaries solve this by spending the overall error budget across the planned interim analyses, so the final type I error still equals the nominal level.
The O’Brien-Fleming approach sets very stringent boundaries at early looks — making it hard to stop early unless the effect is large — and relaxes them as the trial approaches its planned end. This preserves most of the error budget for the final analysis, so the design loses little power compared with a fixed single-look trial.
When to Use Interim Analyses
Plan interim analyses when a trial is long or large enough that stopping early for clear benefit, harm, or futility would be ethically or practically important. A data monitoring committee uses the boundaries to decide whether the accumulating evidence justifies stopping.
Boundaries must be specified in the protocol before the trial starts; unplanned peeking inflates the error rate. Report the boundary type and the number and timing of looks, and pair the design with an appropriate sample size. The final result is still read against the boundary, not a fixed p-value of 0.05. Unsure how to plan looks? Our Test Selector can help.
# Classic (fixed-shape) group-sequential boundaries, equally spaced looks
K <- {looks}; alpha <- {alpha}; type <- "{interim_type}" # "OF" = O'Brien-Fleming, "Pocock"
w <- if (type == "Pocock") rep(1, K) else sqrt(K / seq_len(K))
surv <- function(C, NG = 240) {
simp <- c(1, rep(c(4, 2), length.out = NG - 1), 1)
for (k in seq_len(K)) {
b <- C * w[k] * sqrt(k); hn <- 2 * b / NG; ng <- -b + (0:NG) * hn
nd <- if (k == 1) dnorm(ng) else sapply(ng, function(s) sum(simp * dens * dnorm(s - grid)) * h / 3)
s <- sum(simp * nd) * hn / 3; grid <- ng; dens <- nd; h <- hn
}
s
}
C <- uniroot(function(C) 1 - surv(C) - alpha, c(1, 6), tol = 1e-10)$root
round(C * w, 3) # critical |z| at each lookUser guide
When to use. Set efficacy stopping boundaries for a trial with planned interim looks so overall type I error stays at α.
Assumptions. Equally spaced looks (equal information per stage); two-sided test of a normally distributed statistic; boundaries fixed before unblinding.
Common mistakes. Do not add unplanned looks. For unequal spacing use alpha-spending (Lan-DeMets) in specialised software.
Worked example
Click Load example data above, then Run Analysis to see a fully worked result with figure, formula and interpretation for this test.
References
- O’Brien PC, Fleming TR. A multiple testing procedure for clinical trials. Biometrics. 1979;35(3):549-556.
- Pocock SJ. Group sequential methods in the design and analysis of clinical trials. Biometrika. 1977;64(2):191-199.
- Jennison C, Turnbull BW. Group Sequential Methods with Applications to Clinical Trials. CRC; 2000.
Worked Examples
Example 1 — Two interim looks
A trial plans two interim analyses and a final one. O’Brien-Fleming boundaries require very extreme results to stop at the first look, slightly less extreme at the second, and approximately the usual threshold at the end. The overall false-positive rate stays at 5% despite three tests.
Example 2 — Early stopping for benefit
If the first interim z-statistic exceeds the stringent early boundary, the monitoring committee may stop the trial for overwhelming benefit. Because the early boundary is so demanding, crossing it is strong evidence and protects against stopping on a fluke.
Assumptions to Check
Pre-specified looks. The number and timing of interim analyses must be fixed in the protocol. Unplanned analyses are not covered by the boundaries and inflate the error rate.
A spending function or fixed boundary. The method assumes a defined way of allocating the error budget across looks; changing it mid-trial without an alpha-spending framework breaks the guarantee.
Information fraction. The boundaries depend on how much of the planned information has accrued at each look, so the timing must be tracked accurately.
Common Mistakes
Unplanned interim looks
Peeking at the data outside the planned schedule inflates the type I error. Every look must be accounted for in the boundary.
Reading the final analysis against 0.05
After interim looks, the final critical value is slightly stricter than 0.05. Comparing the final p-value to 0.05 ignores the multiplicity correction.
Stopping early on a weak signal
O’Brien-Fleming boundaries are deliberately stringent early. Stopping for a result that has not crossed the boundary discards the error control.
Confusing efficacy and futility boundaries
Stopping for benefit and stopping for futility use different rules. Applying an efficacy boundary to a futility decision misstates the evidence.
Frequently Asked Questions
Why not just test at 0.05 each time?
Repeated testing at 0.05 inflates the overall false-positive rate well above 5%; group-sequential boundaries spend the error budget so the total stays at the nominal level.
Why are O’Brien-Fleming boundaries stringent early?
They reserve most of the error budget for the final analysis, so the trial keeps nearly full power while still allowing early stopping for large effects.
Who decides whether to stop?
An independent data monitoring committee reviews the interim results against the pre-specified boundaries and recommends continuing or stopping.
Does the result match R and SAS?
Yes. The calculator computes the classical O’Brien-Fleming and Pocock critical values for equally spaced looks, which match published tables: for 5 looks at two-sided alpha 0.05, O’Brien-Fleming gives |z| 4.562, 3.226, 2.634, 2.281, 2.040 and Pocock gives 2.413 at every look. In the R snippet, set type <- "Pocock" to reproduce Pocock boundaries.
Related Calculators
References
- O’Brien PC, Fleming TR. A multiple testing procedure for clinical trials. Biometrics. 1979;35(3):549–556. PMID 497341.
- Fleming TR, DeMets DL. Monitoring of clinical trials: issues and recommendations. Control Clin Trials. 1993;14(3):183–197. PMID 8339549.
- Lan KKG, DeMets DL. Discrete sequential boundaries for clinical trials. Biometrika. 1983;70(3):659–663.
Need This Analysis Done for Your Manuscript?
Our PhD biostatisticians design group-sequential and adaptive trials — alpha-spending boundaries, interim monitoring plans, and final analysis — with reproducible R output.
