
Exact binomial median-unbiased estimation for group sequential designs
Source:R/medianEstimateBinomialExact.R
sequentialMedianEstimateBinomialExact.RdsequentialMedianEstimateBinomialExact() computes a sequential
median-unbiased estimate of vaccine or prevention efficacy, or of the
hazard ratio, for the exact binomial representation of a gsSurv
design. It is the exact binomial analog of
sequentialMedianEstimate().
repeatedMedianEstimateBinomialExact() computes the corresponding
repeated bounds and estimate at each analysis, from which the sequential
versions are derived.
Usage
sequentialMedianEstimateBinomialExact(
gsD,
n.I = NULL,
x = NULL,
scale = c("efficacy", "HR"),
tol = 1e-08,
maxiter = 100,
usTime = NULL,
finalReview = NULL,
sfu = NULL,
sfupar = NULL
)
repeatedMedianEstimateBinomialExact(
gsD,
n.I = NULL,
x = NULL,
scale = c("efficacy", "HR"),
tol = 1e-08,
maxiter = 100,
usTime = NULL,
finalReview = NULL,
sfu = NULL,
sfupar = NULL
)Arguments
- gsD
A
gsSurvobject with non-bindingtest.type1, 4, 6, or 8.- n.I
Non-decreasing non-negative integer total event counts at completed reviews. Zero events and unchanged counts between reviews are allowed. If
NULL, planned integer event counts fromtoInteger(gsD)are used.- x
Integer experimental arm event counts at the reviews in
n.I. These must be non-decreasing and cannot increase by more thann.I.- scale
"efficacy"(default) reports estimates and bounds as efficacy,1 - HR, as inrepeatedCIBinomialExact();"HR"reports the experimental-to-control hazard ratio.- tol
Absolute tolerance on the conditional binomial event probability scale for locating each change in the exact bounds.
- maxiter
Maximum bisection iterations for locating each change in the exact bounds.
- usTime
Optional non-decreasing spending times (length of
n.I) in \([0, 1]\) (larger values are set to 1), as inrepeatedCIBinomialExact(). IfNULL(default), spending usesmin(n.I / planned final events, 1).- finalReview
Optional integer index of the scheduled final review. Spending time is set to 1 at that review and any later ones, so the remaining spending is a target there; discreteness can leave achieved spending below it. Only the scheduled final review triggers this: neither the last supplied review nor an earlier boundary crossing does, and earlier spending is unchanged. This is the analog of
maxSpendintoBinomialExact. IfNULL(default), no override is applied.- sfu, sfupar
Optional spending function and parameter used in both tails, replacing
gsD$upper$sfandgsD$upper$paramwithout modifyinggsD. For harm monitoring, supply the harm spending function, for examplesfu = sfLDPocock.
Value
A data frame with one row per completed analysis containing
Analysis, n.I, x, spending_time, the
conventional estimate, the sequential (or repeated) bounds
lower and upper with one half in each tail, and their
midpoint median_unbiased. Values are on the scale given by the
attribute "scale": "efficacy" or "HR".
Details
Conditional on the total number of events, the experimental arm count is
binomial with event probability \(p = HR\,r/(1 + HR\,r)\) for
randomization ratio \(r\). At each analysis, the repeated bounds with
one half in each tail are the smallest and largest values not rejected by
the exact sequential tests used by repeatedCIBinomialExact():
the lower event count test and its mirror image, each with spending
function total one half. Exact bounds are not monotone in the candidate
value, so the bounds are convex hull endpoints. The sequential bounds are
the running maximum of the repeated lower bounds and the running minimum of
the repeated upper bounds, the values not rejected at any analysis so far,
as in sequentialCIBinomialExact().
The estimate is the midpoint of the bounds on the log hazard ratio scale, following Liu and Anderson (2008). Under the binomial model the probability that the sequential lower bound exceeds the true value, or the upper bound falls below it, is at most the spending through that analysis (at most one half). Because the data are discrete, the estimate is approximately, not exactly, median-unbiased.
Unlike the normal case, the repeated estimate is not the conventional estimate. With a single analysis it is the midpoint, on the log hazard ratio scale, of the medians of the Beta\((x, n - x + 1)\) and Beta\((x + 1, n - x)\) distributions. The repeated estimate does not adjust for stopping that depends on the data; the sequential estimate retains evidence from earlier analyses.
With no events the estimate is NA. With all events in the control
arm (x = 0) the estimated hazard ratio is 0, and with all events in
the experimental arm it is infinite, as for the conventional estimate.
The estimate is intended for reporting; use the group sequential bounds for
decisions.
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.
Examples
design <- gsSurv(
k = 3, test.type = 4, timing = c(.45, .7), ratio = 3,
hr = .3, hr0 = .7
)
counts <- toBinomialExact(design)$n.I
# \donttest{
sequentialMedianEstimateBinomialExact(design, counts, x = c(12, 23, 38))
#> Analysis n.I x spending_time estimate lower upper median_unbiased
#> 1 1 31 12 0.4590816 0.7894737 0.5907142 0.8946181 0.7923192
#> 2 2 48 23 0.7108360 0.6933333 0.5907142 0.7823314 0.7015227
#> 3 3 68 38 1.0000000 0.5777778 0.5907142 0.5909881 0.5908512
repeatedMedianEstimateBinomialExact(design, counts, x = c(12, 23, 38))
#> Analysis n.I x spending_time estimate lower upper median_unbiased
#> 1 1 31 12 0.4590816 0.7894737 0.5907142 0.8946181 0.7923192
#> 2 2 48 23 0.7108360 0.6933333 0.5672753 0.7823314 0.6930952
#> 3 3 68 38 1.0000000 0.5777778 0.5649234 0.5909881 0.5781570
# Hazard ratio scale with Pocock spending, as for harm monitoring
sequentialMedianEstimateBinomialExact(
design, counts, x = c(12, 23, 38), sfu = sfLDPocock, scale = "HR"
)
#> Analysis n.I x spending_time estimate lower upper median_unbiased
#> 1 1 31 12 0.4590816 0.2105263 0.1611109 0.2759993 0.2108708
#> 2 2 48 23 0.7108360 0.3066667 0.2639355 0.2759993 0.2699000
#> 3 3 68 38 1.0000000 0.4222222 0.3901622 0.2759993 0.3281531
# }