Algorithm Search⌘K

Techniqueadvanced

Alpha spending function

Also called Lan-DeMets alpha spending, error spending function.

Lan and DeMets's rule that spends the type I error as a function of the information fraction, so the timing and number of interim looks need not be fixed in advance.

An alpha spending function ff describes how a group sequential design uses its type I error over the course of a study. It maps the information fraction t∈[0,1]t \in [0, 1], the share of the planned maximum information observed so far, to the error spent up to that point, with f(0)=0f(0) = 0 and f(1)=αf(1) = \alpha. When an analysis happens at fraction tkt_k, its critical value ckc_k is chosen so that the probability under H0H_0 of crossing first at this analysis is exactly f(tk)−f(tk−1)f(t_k) - f(t_{k-1}). Lan and DeMets introduced the method in 1983. Its value is flexibility: the number and the times of the analyses need not be fixed in advance, and the overall type I error is still f(1)=αf(1) = \alpha, as long as the times do not depend on the observed effect. The choice of ff sets the shape: some functions give boundaries close to the O'Brien-Fleming boundary, others give boundaries close to Pocock's.

In plain words

Think of the allowed false positive rate as a budget, for example 5%. Each look at the data spends some of it. A spending function is a plan, written before the study, that says how much of the budget may be used by each point of the study, measured by the share of the data collected. Early looks spend little, so they need very strong evidence to stop. When a look actually happens, you check how far the study is, see how much budget the plan allows by then, and spend the difference since the last look. You can look more often or less often than you expected. As long as the plan stays the same, the total spent cannot exceed the budget.

When it applies

  • A study with interim analyses whose number or timing is not known in advance, for example because a data monitoring committee meets on calendar dates while patients enter the trial at an uneven rate.
  • The test statistics have the canonical joint distribution of a group sequential design: the score Sk=ZktkS_k = Z_k\sqrt{t_k}, on the information fraction scale, is a Brownian motion with drift θImax⁡\theta\sqrt{I_{\max}} observed at the times t1<t2<⋯t_1 < t_2 < \cdots.
  • The maximum information Imax⁡I_{\max} can be planned, so the information fraction tk=Ik/Imax⁡t_k = I_k/I_{\max} is known at each analysis.
  • The times tkt_k are chosen without looking at the estimated effect. They may depend on calendar time, on recruitment, or on the previous decisions to continue.

The template

Fix the spending function ff and the two-sided level α=f(1)\alpha = f(1). Under H0H_0, Sk=ZktkS_k = Z_k\sqrt{t_k} has independent increments Sk−Sk−1∼N(0,tk−tk−1)S_k - S_{k-1} \sim N(0, t_k - t_{k-1}). Let σk=tk−tk−1\sigma_k = \sqrt{t_k - t_{k-1}} and bk=cktkb_k = c_k\sqrt{t_k}. At analysis kk the procedure needs only t1,…,tkt_1, \ldots, t_k.

  1. SPENDING-BOUNDARIES(f, t_1 < t_2 < ... < t_K) ▷ 0 < t_1, t_K ≤ 1, f increasing
  2. 1c_1 ← z_{1 - f(t_1)/2}; g ← density of N(0, t_1), restricted to |s| < c_1·sqrt(t_1)
  3. 2for k ← 2 to K do
  4. 3π_k ← f(t_k) - f(t_{k-1}) ▷ the error to spend now
  5. 4c_k ← the root c of ∫ g(u)[Φ̄((c·sqrt(t_k) - u)/σ_k) + Φ((-c·sqrt(t_k) - u)/σ_k)] du = π_k, by bisection
  6. 5g ← ∫ g(u) φ((s - u)/σ_k)/σ_k du, restricted to |s| < c_k·sqrt(t_k)
  7. 6return c_1, ..., c_K

The function gg in line L1 and line L5 is the sub-density of SkS_k on the event that the boundary was not crossed at analyses 1,…,k1, \ldots, k. Its total mass is the probability of reaching analysis k+1k + 1. The integral in line L4 is the probability of crossing first at analysis kk with critical value cc; it is the recursion of Armitage, McPherson and Rowe (1969) from the group sequential design page. The implementation evaluates the integrals by Simpson's rule on a grid (numerical integration) and solves line L4 by bisection.

Why the total is α\alpha. Let AkA_k be the event that the test crosses first at analysis kk. Line L1 gives P0(A1)=P0(∣Z1∣≥c1)=f(t1)P_0(A_1) = P_0(|Z_1| \ge c_1) = f(t_1). Line L4 gives P0(Ak)=f(tk)−f(tk−1)P_0(A_k) = f(t_k) - f(t_{k-1}) for k≥2k \ge 2. The events are disjoint, so

P0(⋃k≤KAk)=f(t1)+∑k=2K(f(tk)−f(tk−1))=f(tK)≤f(1)=α,P_0\Bigl(\bigcup_{k \le K} A_k\Bigr) = f(t_1) + \sum_{k=2}^K \bigl(f(t_k) - f(t_{k-1})\bigr) = f(t_K) \le f(1) = \alpha,

with equality when the last analysis is at tK=1t_K = 1. Nothing in this sum depends on KK or on the values tkt_k; that is the whole point of the method.

Why line L4 has exactly one root. Let qkq_k be the total mass of gg before line L4, the probability of reaching analysis kk. The crossing probability in line L4 is continuous and strictly decreasing in c≥0c \ge 0, from qkq_k at c=0c = 0 to 0 as c→∞c \to \infty. Since qk=1−f(tk−1)>f(tk)−f(tk−1)=πk>0q_k = 1 - f(t_{k-1}) > f(t_k) - f(t_{k-1}) = \pi_k > 0 when f(tk)≤α<1f(t_k) \le \alpha < 1, there is exactly one root. If f(tk)=f(tk−1)f(t_k) = f(t_{k-1}), no error is left to spend and ck=∞c_k = \infty: the analysis cannot stop the study.

Times that depend on the past. The times may be chosen after the earlier analyses, as long as the choice uses only information that is independent of the effect estimates, or only the decisions to continue. The argument above conditions on the times, so it still holds. If the timing reacts to the observed effect, this argument does not apply and the level is no longer guaranteed.

Cost. With mm grid points per analysis and BB bisection steps, each analysis costs O(m2)O(m^2) for line L5 and O(Bm)O(Bm) for line L4, so the whole set costs O(K(m2+Bm))O(K(m^2 + Bm)) time and O(m)O(m) space.

Example: five equally spaced analyses, α=0.05\alpha = 0.05 two-sided. Lan and DeMets's O'Brien-Fleming type function is f(t)=2−2Φ(z1−α/2/t)f(t) = 2 - 2\Phi(z_{1-\alpha/2}/\sqrt t), which equals α\alpha at t=1t = 1. Its cumulative spending at t=0.2,0.4,0.6,0.8,1t = 0.2, 0.4, 0.6, 0.8, 1 is 0.0000120.000012, 0.0019420.001942, 0.0113960.011396, 0.028430.02843 and 0.050.05. The boundaries from the template are:

spending function f(t)f(t) c1c_1 c2c_2 c3c_3 c4c_4 c5c_5
O'Brien-Fleming type 2−2Φ(z1−α/2/t)2 - 2\Phi(z_{1-\alpha/2}/\sqrt t) 4.3826 3.0997 2.5534 2.2538 2.0635
same shape spent on each tail with α/2\alpha/2 4.8769 3.3570 2.6803 2.2898 2.0310
Pocock type αlog⁡(1+(e−1)t)\alpha\log(1 + (e - 1)t) 2.4380 2.4268 2.4102 2.3966 2.3860
power αt\alpha t (ρ=1\rho = 1) 2.5758 2.4920 2.4108 2.3391 2.2755
power αt3\alpha t^3 (ρ=3\rho = 3) 3.5401 2.9743 2.6045 2.3064 2.0455
Hwang-Shih-DeCani, γ=−4\gamma = -4 3.2527 2.9860 2.6917 2.3737 2.0253
Hwang-Shih-DeCani, γ=1\gamma = 1 2.4487 2.4190 2.3984 2.3912 2.3948

For comparison, the exact O'Brien-Fleming boundary is 4.5617, 3.2256, 2.6337, 2.2809, 2.0401, and the exact Pocock boundary is 2.4132 at every analysis. The spending versions are close but not equal.

There are two conventions for the O'Brien-Fleming type function in a two-sided test, and they give different numbers. In the first row, the function is applied to the total two-sided α\alpha, as in Lan and DeMets (1983). In the second row, which many software packages use, each tail spends α/2\alpha/2 with the one-sided function 2−2Φ(z1−α/4/t)2 - 2\Phi(z_{1-\alpha/4}/\sqrt t), so the total is f(t)=4−4Φ(z1−α/4/t)f(t) = 4 - 4\Phi(z_{1-\alpha/4}/\sqrt t). The second convention spends less early and more late. A report must state which one it used.

Example: the analyses happen at other times. The study planned five analyses but the committee met only at t=0.3t = 0.3, 0.70.7 and 11. With the O'Brien-Fleming type function on the total α\alpha, the template gives 3.5784, 2.3454 and 2.0238, and the total error is still exactly 0.05.

Classic examples

  • Approximating the O'Brien-Fleming design. The function 2−2Φ(z1−α/2/t)2 - 2\Phi(z_{1-\alpha/2}/\sqrt t) gives boundaries close to the O'Brien-Fleming boundary for equally spaced analyses, and stays valid when the spacing changes. It is the most common choice in clinical trials.
  • Approximating the Pocock design. αlog⁡(1+(e−1)t)\alpha\log(1 + (e - 1)t) gives nearly constant boundaries close to Pocock's, as the table shows.
  • Flexible monitoring in a group sequential design. A data monitoring committee that meets every six months while recruitment speeds up computes each boundary at the meeting, from the information fraction at that time.
  • Linear spending and Bonferroni. With f(t)=αtf(t) = \alpha t and KK equally spaced analyses, each analysis spends α/K\alpha/K. A Bonferroni correction would also test each analysis at α/K\alpha/K, but the spending boundaries are lower (2.58 down to 2.28 against z1−0.005=2.58z_{1 - 0.005} = 2.58 at every look), because they use the correlation of the statistics. The family-wise error rate is exactly α\alpha for the spending boundaries and below α\alpha for Bonferroni.
  • Continuous monitoring as a limit. With very many analyses the boundary tends to a curved boundary for Brownian motion. For truly continuous monitoring without a planned maximum, the mixture SPRT and confidence sequences are the matching tools.

Variations

  • Families of spending functions. Kim and DeMets (1987) use the power family αtρ\alpha t^\rho: ρ=1\rho = 1 is close to Pocock, ρ=3\rho = 3 is close to O'Brien-Fleming. Hwang, Shih and DeCani (1990) use α(1−e−γt)/(1−e−γ)\alpha(1 - e^{-\gamma t})/(1 - e^{-\gamma}): γ=1\gamma = 1 is close to Pocock, γ=−4\gamma = -4 is close to O'Brien-Fleming, and γ=0\gamma = 0 means linear spending.
  • Beta spending. A second function spends the type II error and gives a futility boundary. The two boundaries are found together, analysis by analysis.
  • One-sided designs. For a one-sided test of level α\alpha, line L1 uses z1−f(t1)z_{1 - f(t_1)} and line L4 counts only the upper crossing.
  • Changing the maximum information. If the final analysis falls above the planned Imax⁡I_{\max}, spend the rest of α\alpha at the final analysis, setting its fraction to 1. If the study ends early at tK<1t_K < 1, it can spend the rest of α\alpha there instead of only f(tK)f(t_K), as long as that decision does not depend on the observed effect.
  • Repeated confidence intervals. The boundaries ckc_k give the intervals θ^k±ck/Ik\hat\theta_k \pm c_k/\sqrt{I_k}, which cover θ\theta at all analyses together with probability 1−α1 - \alpha.

Pitfalls

  • Choosing ff after seeing data. The function must be fixed in the protocol. Switching to a less strict function after an interim result inflates the error.
  • Timing that reacts to the effect. Calling an extra analysis because the last one looked promising breaks the assumption that the times are independent of the effect estimates.
  • Mixing conventions. The two-sided O'Brien-Fleming type function has two conventions, as the example shows. Software defaults differ, so record the convention and the resulting boundaries.
  • Information fraction in survival trials. Information is the number of events, not the number of patients. Use the observed number of events divided by the planned number, or the fraction will be wrong.
  • Overrunning. Data that arrive after the decision to stop, for example patients already treated, change the final statistic. The plan should say how they enter the final analysis.

Code

Each implementation follows the pseudocode above. A comment @line links a line of code to a line of the pseudocode. Point at a line of the pseudocode to see the matching code. The build runs the native tests of each language.

alpha_spending_function.pyI0RawGitHub
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/alpha-spending-function/. The authors are listed in prov/9MKH4V.jsonl.
"""Lan-DeMets alpha spending: two-sided group sequential boundaries from a spending function.

A spending function f maps the information fraction t in [0, 1] to the type I
error spent so far, with f(0) = 0, f(1) = alpha, and f nondecreasing. At
analysis k, with information fraction t_k, the boundary c_k solves

    P0(|Z_j| < c_j for j < k, |Z_k| >= c_k) = f(t_k) - f(t_(k-1)).

Z_k is the standardized statistic. The score S_k = Z_k sqrt(t_k) is a standard
Brownian motion at the times t_1 < ... < t_K. The sub-density of S_k on the
continuation event is carried on a Simpson grid (recursive numerical
integration), and c_k is found by bisection. Cost O(K (m^2 + b m)) for m grid
points per stage and b bisection steps.
"""

import math
from collections.abc import Callable, Sequence

_SQRT2 = math.sqrt(2.0)
_INV_SQRT_2PI = 1.0 / math.sqrt(2.0 * math.pi)


def norm_cdf(x: float) -> float:
    return 0.5 * math.erfc(-x / _SQRT2)


def norm_sf(x: float) -> float:
    return 0.5 * math.erfc(x / _SQRT2)


def norm_pdf(x: float) -> float:
    return _INV_SQRT_2PI * math.exp(-0.5 * x * x)


def norm_quantile(p: float) -> float:
    """The lower p-quantile of the standard normal, by bisection to 1e-15."""
    if not 0.0 < p < 1.0:
        raise ValueError("p must be in (0, 1)")
    lo, hi = -40.0, 40.0
    for _ in range(200):
        mid = 0.5 * (lo + hi)
        if norm_cdf(mid) < p:
            lo = mid
        else:
            hi = mid
        if hi - lo < 1e-15:
            break
    return 0.5 * (lo + hi)


def obf_spending(alpha: float) -> Callable[[float], float]:
    """Lan-DeMets O'Brien-Fleming type: f(t) = 2 - 2 Phi(z_(1 - alpha/2) / sqrt(t))."""
    zq = norm_quantile(1.0 - alpha / 2.0)
    return lambda t: 0.0 if t <= 0.0 else 2.0 * norm_sf(zq / math.sqrt(t))


def pocock_spending(alpha: float) -> Callable[[float], float]:
    """Lan-DeMets Pocock type: f(t) = alpha log(1 + (e - 1) t)."""
    return lambda t: alpha * math.log(1.0 + (math.e - 1.0) * t)


def power_spending(alpha: float, rho: float) -> Callable[[float], float]:
    """Kim-DeMets power family: f(t) = alpha t^rho, rho > 0."""
    if rho <= 0:
        raise ValueError("rho must be positive")
    return lambda t: alpha * t ** rho


def hsd_spending(alpha: float, gamma: float) -> Callable[[float], float]:
    """Hwang-Shih-DeCani family: f(t) = alpha (1 - e^(-gamma t)) / (1 - e^(-gamma)); gamma = 0 is linear."""
    if gamma == 0:
        return lambda t: alpha * t
    return lambda t: alpha * (1.0 - math.exp(-gamma * t)) / (1.0 - math.exp(-gamma))


def _simpson_grid(b: float, step: float) -> tuple[list[float], list[float]]:
    n = max(2, 2 * math.ceil(b / step))
    h = 2.0 * b / n
    xs = [-b + i * h for i in range(n + 1)]
    ws = [(1.0 if i in (0, n) else (4.0 if i % 2 else 2.0)) * h / 3.0 for i in range(n + 1)]
    return xs, ws


def spending_boundaries(spend: Callable[[float], float], times: Sequence[float], r: int = 16,
                        tol: float = 1e-10) -> list[float]:
    """The z-scale two-sided boundaries c_1, ..., c_K for the spending function spend.

    Precondition: 0 < times[0] < ... < times[-1] <= 1, and spend increases
    strictly on the times. A zero increment would need c_k = +inf, so it is rejected.
    """
    if not times or any(b <= a for a, b in zip(times, times[1:])) or times[0] <= 0:
        raise ValueError("times must be positive and increasing")
    out = []
    t0 = times[0]
    inc = spend(t0)
    if inc <= 0:
        raise ValueError("each stage must spend a positive amount")
    c = norm_quantile(1.0 - inc / 2.0)  # @line L1
    out.append(c)
    b = c * math.sqrt(t0)
    xs, ws = _simpson_grid(b, math.sqrt(t0) / r)
    g = [norm_pdf(x / math.sqrt(t0)) / math.sqrt(t0) for x in xs]  # @line L1
    for k in range(1, len(times)):  # @line L2
        target = spend(times[k]) - spend(times[k - 1])  # @line L3
        if target <= 0:
            raise ValueError("each stage must spend a positive amount")
        sd = math.sqrt(times[k] - times[k - 1])
        wg = [w * gu for w, gu in zip(ws, g)]
        st = math.sqrt(times[k])

        def cross(ck: float) -> float:
            bk = ck * st
            return sum(a * (norm_sf((bk - u) / sd) + norm_cdf((-bk - u) / sd)) for u, a in zip(xs, wg))

        lo, hi = 0.0, 40.0
        if cross(lo) < target:
            raise ValueError("the spending increment is larger than the mass that is still in play")
        while hi - lo > tol:  # @line L4
            mid = 0.5 * (lo + hi)
            if cross(mid) > target:
                lo = mid
            else:
                hi = mid
        c = 0.5 * (lo + hi)  # @line L4
        out.append(c)
        if k + 1 < len(times):
            b = c * st
            step = min(sd, math.sqrt(times[k + 1] - times[k])) / r
            nxs, nws = _simpson_grid(b, step)
            g = [sum(a * norm_pdf((s - u) / sd) for u, a in zip(xs, wg)) / sd for s in nxs]  # @line L5
            xs, ws = nxs, nws
    return out  # @line L6


def crossing_by_stage(c: Sequence[float], times: Sequence[float], r: int = 16) -> list[float]:
    """P0 of the first crossing at each analysis, for given z-scale boundaries c."""
    out = []
    t0 = times[0]
    out.append(2.0 * norm_sf(c[0]))
    b = c[0] * math.sqrt(t0)
    xs, ws = _simpson_grid(b, math.sqrt(t0) / r)
    g = [norm_pdf(x / math.sqrt(t0)) / math.sqrt(t0) for x in xs]
    for k in range(1, len(times)):
        sd = math.sqrt(times[k] - times[k - 1])
        bk = c[k] * math.sqrt(times[k])
        wg = [w * gu for w, gu in zip(ws, g)]
        out.append(sum(a * (norm_sf((bk - u) / sd) + norm_cdf((-bk - u) / sd)) for u, a in zip(xs, wg)))
        if k + 1 < len(times):
            step = min(sd, math.sqrt(times[k + 1] - times[k])) / r
            nxs, nws = _simpson_grid(bk, step)
            g = [sum(a * norm_pdf((s - u) / sd) for u, a in zip(xs, wg)) / sd for s in nxs]
            xs, ws = nxs, nws
    return out
test_alpha_spending_function.py 113 lines
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/alpha-spending-function/. The authors are listed in prov/9MKH4V.jsonl.
import math
import random

import pytest

from alpha_spending_function import (
    crossing_by_stage,
    hsd_spending,
    norm_quantile,
    obf_spending,
    pocock_spending,
    power_spending,
    spending_boundaries,
)

TIMES = [0.2, 0.4, 0.6, 0.8, 1.0]


def phi(x: float) -> float:
    return math.exp(-0.5 * x * x) / math.sqrt(2.0 * math.pi)


def upper(x: float) -> float:
    return 0.5 * math.erfc(x / math.sqrt(2.0))


def second_look_mass(c1: float, c2: float, t1: float, n: int = 400) -> float:
    """P(|Z1| < c1, |Z2| >= c2) by a 1-D Simpson rule, with Z2 | Z1 = z ~ N(sqrt(t1) z, 1 - t1)."""
    s, v = math.sqrt(t1), math.sqrt(1.0 - t1)
    h = 2.0 * c1 / n
    acc = 0.0
    for i in range(n + 1):
        z = -c1 + i * h
        w = 1.0 if i in (0, n) else (4.0 if i % 2 else 2.0)
        acc += w * phi(z) * (upper((c2 - s * z) / v) + upper((c2 + s * z) / v))
    return acc * h / 3.0


def test_spending_functions_end_at_alpha():
    for f in (obf_spending(0.05), pocock_spending(0.05), power_spending(0.05, 2.0), hsd_spending(0.05, -4.0),
              hsd_spending(0.05, 0.0)):
        assert f(0.0) == pytest.approx(0.0, abs=1e-15)
        assert f(1.0) == pytest.approx(0.05, abs=1e-12)
        values = [f(t / 20) for t in range(21)]
        assert all(a <= b for a, b in zip(values, values[1:]))


def test_worked_example_obf_type():
    c = spending_boundaries(obf_spending(0.05), TIMES)
    expected = [4.3826, 3.0997, 2.5534, 2.2538, 2.0635]
    assert all(abs(a - b) < 1e-4 for a, b in zip(c, expected))


def test_per_tail_convention_gives_the_software_table():
    # Spending 2 - 2 Phi(z_(1 - 0.025/2) / sqrt t) in each tail.
    g = obf_spending(0.025)
    c = spending_boundaries(lambda t: 2.0 * g(t), TIMES)
    expected = [4.8769, 3.3570, 2.6803, 2.2898, 2.0310]
    assert all(abs(a - b) < 1e-4 for a, b in zip(c, expected))


@pytest.mark.parametrize("f", [obf_spending(0.05), pocock_spending(0.05), power_spending(0.05, 3.0),
                               hsd_spending(0.05, 1.0)])
def test_each_stage_spends_its_increment(f):
    c = spending_boundaries(f, TIMES)
    stage = crossing_by_stage(c, TIMES)
    prev = 0.0
    for t, p in zip(TIMES, stage):
        assert abs(p - (f(t) - prev)) < 1e-8
        prev = f(t)
    assert abs(sum(stage) - 0.05) < 1e-8


def test_one_look_is_fixed_sample():
    c = spending_boundaries(power_spending(0.05, 1.0), [1.0])
    assert abs(c[0] - norm_quantile(0.975)) < 1e-12


def test_two_looks_against_quadrature():
    f = obf_spending(0.05)
    c1, c2 = spending_boundaries(f, [0.5, 1.0])
    assert abs(c1 - norm_quantile(1.0 - f(0.5) / 2.0)) < 1e-12
    assert abs(second_look_mass(c1, c2, 0.5) - (0.05 - f(0.5))) < 1e-7


def test_random_two_look_designs_against_quadrature():
    rng = random.Random(1983)
    for _ in range(500):
        t1 = rng.uniform(0.15, 0.85)
        alpha = rng.uniform(0.01, 0.1)
        rho = rng.uniform(0.5, 4.0)
        f = power_spending(alpha, rho)
        c1, c2 = spending_boundaries(f, [t1, 1.0])
        # Both sides use Simpson grids; their discretization errors stay below 1e-7.
        assert abs(second_look_mass(c1, c2, t1) - (f(1.0) - f(t1))) < 1e-7


def test_unplanned_times_keep_the_level():
    f = obf_spending(0.05)
    for times in ([0.3, 0.7, 1.0], [0.1, 0.25, 0.5, 0.55, 1.0], [0.9, 1.0]):
        c = spending_boundaries(f, times)
        assert abs(sum(crossing_by_stage(c, times)) - 0.05) < 1e-8


def test_bad_input():
    with pytest.raises(ValueError):
        spending_boundaries(obf_spending(0.05), [0.5, 0.5])
    with pytest.raises(ValueError):
        spending_boundaries(lambda t: 0.0, [0.5, 1.0])
    with pytest.raises(ValueError):
        power_spending(0.05, 0.0)

Exercises

  1. Show that f(t)=2−2Φ(z1−α/2/t)f(t) = 2 - 2\Phi(z_{1-\alpha/2}/\sqrt t) is increasing on (0,1](0, 1], tends to 0 as t→0t \to 0 and equals α\alpha at t=1t = 1. For α=0.05\alpha = 0.05, compute f(0.2)f(0.2) and explain why the first boundary in the example is above 4.
  2. Prove that the crossing probability in line L4 is strictly decreasing in cc when gg has positive mass.
  3. With f(t)=αtf(t) = \alpha t and two analyses at t=1/2t = 1/2 and 11, write the equation for c2c_2 as a bivariate normal probability with correlation 1/2\sqrt{1/2}.

References

  1. K. K. Gordon Lan and David L. DeMets, Discrete sequential boundaries for clinical trials, Biometrika 70(3) (1983), pages 659 to 663, the definition of the spending function, the computation of the boundaries from it, and the spending functions that approximate the O'Brien-Fleming and Pocock boundaries
  2. Kyungmann Kim and David L. DeMets, Design and analysis of group sequential tests based on the type I error spending rate function, Biometrika 74(1) (1987), the power family of spending functions alpha t^rho
  3. Irving K. Hwang, Weichung J. Shih and John S. De Cani, Group sequential designs using a family of type I error probability spending functions, Statistics in Medicine 9(12) (1990), the one-parameter family alpha (1 - e^(-gamma t)) / (1 - e^(-gamma))
  4. P. Armitage, C. K. McPherson and B. C. Rowe, Repeated significance tests on accumulating data, Journal of the Royal Statistical Society, Series A 132(2) (1969), the recursive numerical integration of the crossing probabilities
  5. Christopher Jennison and Bruce W. Turnbull, Group Sequential Methods with Applications to Clinical Trials, Chapman and Hall/CRC, 2000, the chapter on the error spending approach

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
Code (python)I0 not checked yet
  • the tests did not run in this build
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW3 standard
  • five exercises