The function calculates the ‘empirical’ power of 2-stage BE studies based on the Inverse-Normal combination method. The main design scheme is according to Maurer et al. (Maximum Combination Test), but it may also be used for other/modified designs, e.g. standard combination method, usage of the observed treatment difference after in the sample size re-estimation step or different futility criteria.
power.tsd.in(alpha, weight, max.comb.test = TRUE, n1, CV, targetpower = 0.8,
theta0, theta1, theta2, GMR, usePE = FALSE, min.n2 = 4, max.n = Inf,
fCpower = targetpower, fCrit = "CI", fClower, fCupper, fCNmax,
ssr.conditional = c("error_power", "error", "no"),
pmethod = c("nct", "exact", "shifted"), npct = c(0.05, 0.5, 0.95),
nsims, setseed = TRUE, details = FALSE)
If one element is given, the overall one-sided significance level. In this
case the adjusted alpha levels will be calculated internally. If two
elements are given, the argument refers to the two adjusted one-sided alpha
levels for and
, respectively.
If missing, defaults to 0.05
.
Pre-defined weight(s) of , see
'Details' for more information.
Note that using the notation from Maurer et al, weight corresponds to
information fraction, other literature may refer to sqrt(weight) as being
the weight. weight
must either contain one element (in case of
max.comb.test = FALSE
) or two elements (in case of
max.comb.test = TRUE
).
If missing, defaults to 0.5
for max.comb.test = FALSE
and to
c(0.5, 0.25)
for max.comb.test = TRUE
.
Logical; if TRUE
(default) the maximum combination test will be
used, otherwise the standard combination test.
Sample size of .
Coefficient of variation of the intra-subject variability (use e.g., 0.3 for 30%).
Desired (overall) target power to declare BE at the end of the trial.
Assumed ratio of geometric means (T/R) for simulations. If missing,
defaults to GMR
.
Lower bioequivalence limit. Defaults to 0.8.
Upper bioequivalence limit. Defaults to 1.25.
Assumed ratio of geometric means (T/R) to be used in power calculation for and sample size re-estimation for . If missing, defaults to 0.95.
If TRUE
the sample size re-estimation is done with the observed
point estimate (PE) of the treatment difference in
.
Defaults to FALSE
.
Note: The futility inspection via the power of stage 1 is always done with
the planning value GMR
.
Minimum sample size of . Defaults to 4.
If the sample size re-estimation step gives a sample size for
less than min.n2
, then
min.n2
will be used for .
Maximum overall sample size +
.
This is not a futility criterion regarding the maximum sample size! If
max.n
is set to a finite value and the sample size re-estimation gives a
sample size for (n2
) such
that n1 + n2 > max.n
, then the sample size for
will be set to n2 = max.n - n1
.
Defaults to Inf
, i.e., no constraint on the re-estimated sample size.
Threshold for power monitoring step to decide on futility for cases where
BE has not been achieved after
: If BE has not been
achieved after and the power for
is greater than or equal to
fCpower
, then the study will be considered a failure.
See ‘Details’ for more information on the choice of
fCpower
.
Futility criterion to use: "No"
(no futility criterion regarding
observed point estimate, confidence interval and maximum sample size),
"PE"
(observed point estimate of the geometric mean ratio from
),
"CI"
(90% confidence interval of the geometric mean ratio from
), "Nmax"
(overall maximum
sample size); or a combination thereof (concatenate abbreviations; see
‘Examples’). Defaults to "CI".
Lower futility limit for the PE or CI of
.
If the PE or CI is completely outside of fClower
… fCupper
the study is stopped due to futility (not BE).
May be missing. If "PE"
or "CI"
is specified within fCrit
,
the default will be set to 0.8 for fCrit = "PE"
or 0.95 for fCrit = "CI"
.
If neither "PE"
nor "CI"
is specified within fCrit
, there
will be no futility constraint regarding point estimate or confidence interval
from (regardless of any
specification of fClower
and/or fCupper
).
Upper futility limit for the PE or CI of
.
Analogous to fClower
: Will be set to 1/fClower
if missing.
Futility criterion regarding maximum sample size. If the determined sample size
for (n2
) is such that
n1 + n2 > fCNmax
, the study will not continue to
and stopped due to futility (not
BE).
If "Nmax"
is specified within fCrit
and argument fCNmax
is missing, the value will be set to fCNmax = 4*n1
. If "Nmax"
is
not specified within fCrit
, then there will be no futility constraint
regarding maximum sample size (regardless of any specification of fCNmax
).
Method for sample size re-estimation step: "no"
does not use
conditional error rates nor the estimated conditional target power for
the second stage, "error"
uses conditional error rates for the
second stage, and "error_power"
uses both conditional error rates
and the estimated conditional target power for the second stage.
Defaults to "error_power"
.
See also ‘Details’.
Power calculation method, also to be used in the sample size estimation for
.
Implemented are "nct"
(approximate calculations via non-central
t-distribution, "exact"
(exact calculations via Owen<U+2019>s Q),
and "shifted"
(approximate calculation via shifted central t-distribution
like in the paper of Potvin et al.)
Defaults to "nct"
as it is a reasonable compromise between speed and
accuracy in the sample size estimation step.
Percentiles to be used for the presentation of the distribution of
n(total)=n1+n2
.
Defaults to c(0.05, 0.5, 0.95)
to obtain the 5% and 95% percentiles
and the median.
Number of studies to simulate.
If missing, nsims
is set to 1E+05 = 100,000 or to 1E+06 = 1 Mio if
estimating the empiric Type I Error ('alpha'
), i.e., with theta0
at
the border of the acceptance range theta1
… theta2
.
Simulations are dependent on the starting point of the (pseudo) random number
generator. To avoid differences in power for different runs a
set.seed(1234567)
is issued if setseed=TRUE
, the default.
Set this argument to FALSE
to view the variation in power between
different runs.
If set to TRUE
the function prints the results of time measurements
of the simulation steps. Default to FALSE
.
Returns an object of class "pwrtsd"
with all the input arguments and results
as components. As part of the input arguments a component cval
is also
presented, containing the critical values for stage 1 and 2 according to the
input based on alpha
, weight
and max.comb.test
.
The class "pwrtsd"
has an S3 print method.
The results are in the components:
Fraction of studies found BE.
Fraction of studies found BE in .
Percentage of studies stopped after (due to BE or due to futility).
Percentage of studies stopped after due to futility.
Percentage of studies continuing to .
Mean of n(total).
Range (min, max) of n(total).
Vector of percentiles of the distribution of n(total).
The underlying subject data are assumed to be evaluated after log-transformation.
But instead of simulating subject data, the statistics pe1, mse1 and pe2, mse2
are simulated via their associated distributions (Normal and
distribution).
The weight
argument always refers to the first weight of a pair of
weights. For example, in case of max.comb.test = FALSE
the standard
combination test requires two weights (w, 1-w) but only the first one, w,
is required as input argument here because the second weight is
automatically specified once the first is given. Similarly for
max.comb.test = TRUE
, w and w* need to be specified, which in turn
define the two pairs of weights (w, 1-w) and (w*, 1-w*).
If ssr.conditional = "error_power"
, the design scheme generally
calculates the estimated conditional target power of the second stage and
uses this value as desired target power in the sample size re-estimation process.
If fCpower
> targetpower
, then the conditional target power
may actually be negative. This does not seem sensible. Therefore, for such
cases the desired target power for the sample size re-calculation will be set
to targetpower
.
K<U+00F6>nig F, Wolfsegger M, Jaki T, Sch<U+00FC>tz H, Wassmer G. Adaptive two-stage bioequivalence trials with early stopping and sample size re-estimation. Vienna: 2014; 35 Annual Conference of the International Society for Clinical Biostatistics. Poster P1.2.88 10.13140/RG.2.1.5190.0967.
Patterson SD, Jones B. Bioequivalence and Statistics in Clinical Pharmacology. Boca Raton: CRC Press; 2 edition 2017.
Kieser M, Rauch G. Two-stage designs for cross-over bioequivalence trials. Stat Med. 2015; 34(16):2403--16. 10.1002/sim.6487.
Maurer W, Jones B, Chen Y. Controlling the type 1 error rate in two-stage sequential designs when testing for average bioequivalence. Stat Med. 2018;1--21. 10.1002/sim.7614.
Wassmer G, Brannath W. Group Sequential and Confirmatory Adaptive Designs in Clinical Trials. Springer 2016. 10.1007/978-3-319-32562-0.
# NOT RUN {
# 12 subjects in stage 1, CV of 20%, no futility rule, otherwise all defaults
# except too low number of sims due to CRAN policy for run-time of examples
# This setting resembles values in Table 6.8 and 6.10 in Patterson and Jones
# if nsims=1e5 (default)
power.tsd.in(n1 = 12, CV = 0.2, fCrit = "No", nsims=1e4)
# Note that actual replication would require the following additional
# arguments (extremely long run-time)
# }
# NOT RUN {
power.tsd.in(n1 = 12, CV = 0.2, fCrit = "No", max.n = 4000,
pmethod = "exact", nsims = 1E6)
# }
# NOT RUN {
# Table 8 in Maurer et al
power.tsd.in(n1 = 36, CV = 0.4, max.n = 4000)
# Same example as before but with additional futility criterion regarding
# maximum sample size (using the default 4*n1 as maximum bound)
power.tsd.in(n1 = 36, CV = 0.4, max.n = 4000, fCrit = c("CI", "Nmax"))
# }
Run the code above in your browser using DataLab