
Median-unbiased estimation after group sequential testing
Source:R/sequentialMedianEstimate.R
sequentialMedianEstimate.RdsequentialMedianEstimate() computes the sequential median-unbiased
estimate of Liu and Anderson (2008) at each completed analysis of a group
sequential design, together with the sequential confidence bounds that
define it. The estimate adjusts for repeated analyses using a spending
function: most often the efficacy spending function, but harm or futility
spending, or another spending function, can be used instead.
repeatedMedianEstimate() computes the corresponding repeated bounds
and estimate at each analysis, from which the sequential versions are
derived.
Usage
sequentialMedianEstimate(
gsD,
n.I = NULL,
Z,
bound = c("upper", "harm", "lower"),
sf = NULL,
sfpar = NULL,
spendingTime = NULL,
conf.level = NULL,
scale = c("natural", "theta"),
tol = 1e-08,
r = NULL
)
repeatedMedianEstimate(
gsD,
n.I = NULL,
Z,
bound = c("upper", "harm", "lower"),
sf = NULL,
sfpar = NULL,
spendingTime = NULL,
conf.level = NULL,
scale = c("natural", "theta"),
tol = 1e-08,
r = NULL
)Arguments
- gsD
A group sequential design generated by
gsDesign(),gsSurv()or related functions.- n.I
Statistical information (for example, event counts for time-to-event outcomes or sample size for most other designs) at the completed analyses; increasing positive values. If
NULL, the planned valuesgsD$n.I[seq_along(Z)]are used.- Z
Z-values at the analyses in
n.I. As elsewhere in the package, positive values favor the experimental treatment, including when harm spending is used.- bound
Which spending function of
gsDdefines the estimate:"upper"(efficacy, the default),"harm"(the harm bound fortest.type7 or 8; the lower bound fortest.type5 or 6, whose lower bound spends under the null) or"lower"(the lower, usually futility, bound). Only the shape of the selected spending function is used; its total is replaced by one half (see Details). Ignored ifsfis supplied.- sf, sfpar
Optional spending function and parameter used instead of the spending function selected by
bound, without modifyinggsD. Ifsfis given withoutsfpar, the parameter isNULL. Required when the selected bound is not defined by a spending function (Wang-Tsiatis, Pocock or O'Brien-Fleming bounds).- spendingTime
Optional non-decreasing spending times in \([0, 1]\) (larger values are set to 1) at the analyses in
n.I, for example elapsed calendar time over the planned final calendar time. IfNULL(default), spending time ismin(n.I / planned final information, 1), where the planned final information isgsD$maxn.IPlanif available, otherwisemax(gsD$n.I).- conf.level
Optional two-sided confidence level. If supplied, sequential (or, for
repeatedMedianEstimate(), repeated) confidence bounds with(1 - conf.level) / 2in each tail are also returned.- scale
"natural"(default) reports estimates and bounds on the natural parameter scale used bygsBoundSummary(); for example, the hazard ratio for survival designs."theta"reports them on the standardized scale ofgsD$delta, where the conventional estimate isZ / sqrt(n.I).- tol
Tolerance for the boundary search in
gsBound1().- r
Integer controlling the numerical integration grid; see
gsDesign(). Defaults togsD$r, or 18 if unavailable.
Value
A data frame with one row per completed analysis containing
Analysis, n.I, Z, spending_time,
critical_value (\(c_j(1/2)\)), the conventional estimate,
the sequential (or repeated) bounds lower and upper at one
half in each tail, and their midpoint median_unbiased. If
conf.level is supplied, conf.low, conf.high and
conf.level are added. Estimates and bounds are on the scale given
by the attribute "scale": "HR", "delta" or
"theta".
Details
Repeated and sequential bounds. Let \(c_i(\mu)\) be critical values at the observed information \(I_i\) for an upper bound with cumulative spending \(\mu f(t_i) / f(1)\), where \(f\) is the selected spending function and \(t_i\) the spending time; other bounds are ignored, as for non-binding bounds. With conventional estimates \(\hat\theta_i = Z_i/\sqrt{I_i}\), the repeated confidence bounds at analysis \(i\) are \(\hat\theta_i \mp c_i(\mu)/\sqrt{I_i}\): the values not rejected at analysis \(i\), as in the repeated confidence intervals of Jennison and Turnbull. The sequential confidence bounds at analysis \(j\) are their running maximum and minimum, the values not rejected at any analysis \(i \le j\): $$L_j(\mu) = \max_{i \le j}\{\hat\theta_i - c_i(\mu)/\sqrt{I_i}\},\quad U_j(\mu) = \min_{i \le j}\{\hat\theta_i + c_i(\mu)/\sqrt{I_i}\}.$$ This mirrors repeated and sequential p-values: the sequential p-value is the minimum of the repeated p-values, and the sequential interval is the intersection of the repeated intervals. Under the joint normal model, \(P_\theta\{L_j(\mu) \ge \theta\}\) is the spending by analysis \(j\), and similarly for \(U_j\). Liu and Anderson show that these probabilities remain upper bounds at any stopping time that depends on the accumulating data. The median-unbiased estimate is the midpoint \(\{L_j(1/2) + U_j(1/2)\}/2\), the center of the sequential interval with one half in each tail, which has confidence level zero. At an analysis fixed in advance it is median-unbiased, because it is equivariant under shifts of \(\theta\) and its error is symmetric about zero.
The midpoint of the repeated bounds at one half is the conventional
estimate, because the repeated interval is symmetric about it. It is
median-unbiased at an analysis fixed in advance but does not adjust for
stopping that depends on the data. The sequential estimate equals the
conventional estimate at the first analysis and whenever the current
analysis sets both bounds. Otherwise it retains evidence from earlier
analyses. The bounds at one half can cross
(lower > upper); the midpoint remains defined. An analysis with no
new spending, such as one after the spending time has reached 1, has an
infinite critical value and does not change the sequential bounds; its
repeated bounds are infinite and its repeated estimate is NA. If no
spending has occurred, the sequential bounds are infinite and the estimate
is NA.
The selected spending function's total (alpha, beta or
astar) is not used: only its shape and the spending times. For
beta-spending futility bounds this reuses the shape of a function defined
under the alternative hypothesis. In harm monitoring, harm spending is
natural: the bounds then share the spending function of the harm monitor.
The estimate is intended for reporting. Comparing it, or the conventional estimate, with a threshold at every analysis is an unadjusted test; use the group sequential bounds for decisions.
On the natural scale, the mapping is that of
gsBoundSummary(): for survival designs (class gsSurv or
nFixSurv > 0), the approximate hazard ratio
\(hr_0 \exp(\mp\hat\theta / \sqrt{\psi})\) with
\(\psi = ratio/(1 + ratio)^2\); otherwise
delta0 + (delta1 - delta0) * theta / delta. The mapping is monotone,
so lower and upper are the transformed bounds in the order of
the natural scale.
References
Liu Q and Anderson KM (2008). On adaptive extensions of group sequential trials for clinical investigations. Journal of the American Statistical Association, 103(484), 1621–1630.
Jennison C and Turnbull BW (2000), Group Sequential Methods with Applications to Clinical Trials. Boca Raton: Chapman and Hall.
See also
sequentialPValue(),
sequentialMedianEstimateBinomialExact() for exact binomial
versions, sequentialCIBinomialExact(),
gsBoundSummary()
Examples
x <- gsSurv(
k = 3, test.type = 4, alpha = 0.025, beta = 0.1, timing = c(.5, .75),
sfu = sfLDOF, sfl = sfHSD, sflpar = -2, lambdaC = log(2) / 12,
hr = 0.7, eta = 0.01, gamma = 10, R = 12, T = 36, minfup = 24
)
x$n.I
#> [1] 178.0697 267.1046 356.1395
# Efficacy is crossed only at the final analysis.
# Efficacy spending (default); hazard ratio scale
sequentialMedianEstimate(x, n.I = c(180, 265, 356), Z = c(1.6, 2.1, 2.3))
#> Analysis n.I Z spending_time critical_value estimate lower upper
#> 1 1 180 1.6 0.5054200 0.4049675 0.7877977 0.7416462 0.8368211
#> 2 2 265 2.1 0.7440905 0.3880684 0.7725922 0.7416462 0.8103198
#> 3 3 356 2.3 0.9996084 0.3312313 0.7836447 0.7566080 0.8103198
#> median_unbiased
#> 1 0.7877977
#> 2 0.7752230
#> 3 0.7830035
# Futility spending, with sequential 90% confidence bounds
sequentialMedianEstimate(
x, n.I = c(180, 265, 356), Z = c(1.6, 2.1, 2.3),
bound = "lower", conf.level = 0.9
)
#> Analysis n.I Z spending_time critical_value estimate lower upper
#> 1 1 180 1.6 0.5054200 1.09485890 0.7877977 0.6691642 0.9274634
#> 2 2 265 2.1 0.7440905 0.69086014 0.7725922 0.7097217 0.8410320
#> 3 3 356 2.3 0.9996084 0.04590041 0.7836447 0.7798412 0.7874668
#> median_unbiased conf.low conf.high conf.level
#> 1 0.7877977 0.5669860 1.094604 0.9
#> 2 0.7725922 0.6009824 0.993205 0.9
#> 3 0.7836447 0.6502338 0.944428 0.9
# Repeated bounds and repeated 90% confidence intervals; the repeated
# estimate is the conventional estimate
repeatedMedianEstimate(
x, n.I = c(180, 265, 356), Z = c(1.6, 2.1, 2.3), conf.level = 0.9
)
#> Analysis n.I Z spending_time critical_value estimate lower upper
#> 1 1 180 1.6 0.5054200 0.4049675 0.7877977 0.7416462 0.8368211
#> 2 2 265 2.1 0.7440905 0.3880684 0.7725922 0.7366211 0.8103198
#> 3 3 356 2.3 0.9996084 0.3312313 0.7836447 0.7566080 0.8116476
#> median_unbiased conf.low conf.high conf.level
#> 1 0.7877977 0.5409298 1.1473305 0.9
#> 2 0.7725922 0.6022068 0.9911856 0.9
#> 3 0.7836447 0.6531016 0.9402811 0.9