This functions calculate the ‘empirical’ power of 2-stage BE studies
with 2 parallel groups according to Fuglsang via simulations. The Potvin decision
schemes are modified to include a futility criterion Nmax and to allow the
sample size estimation step to be done with point estimate and variabilities
from (fully adaptive).
Function power.tsd.pAF()
performes exactly as described in
Fuglsang<U+2019>s paper, namely the power monitoring steps and the sample
size estimation are based always on the pooled t-test.
Function power.tsd.p()
with argument test="welch"
on the
other hand uses the genuine power of Welch<U+2019>s test. Moreover it
accepts unequal treatment groups.
power.tsd.p(method = c("B", "C"), alpha0 = 0.05, alpha = c(0.0294, 0.0294),
n1, GMR, CV, targetpower = 0.8,
pmethod = c("nct", "exact", "shifted"),
usePE = FALSE, Nmax = Inf, test = c("welch", "t-test", "anova"),
theta0, theta1, theta2, npct = c(0.05, 0.5, 0.95), nsims,
setseed = TRUE, details = FALSE)power.tsd.pAF(method = c("B", "C"), alpha0 = 0.05, alpha = c(0.0294, 0.0294),
n1, GMR, CV, targetpower = 0.8,
pmethod = c("shifted", "nct", "exact"),
usePE = FALSE, Nmax = Inf, test = c("welch", "t-test", "anova"),
theta0, theta1, theta2, npct = c(0.05, 0.5, 0.95), nsims,
setseed = TRUE, details = FALSE)
Decision schemes according to Potvin et.al. (defaults to "B"
).
Potvin<U+2019>s ‘method D’ can be obtained by choosing "C"
but
setting alpha=c(0.028, 0.028)
.
Alpha value for the first step(s) in Potvin "C"
, the power inspection
and BE decision if power > targetpower.
Defaults to 0.05.
Vector (two elements) of the nominal alphas for the two stages.
Defaults to Pocock<U+2019>s alpha setting alpha=c(0.0294, 0.0294)
.
Sample size of .
Function power.tsd.p()
accepts also a vector of sample sizes with two elements, where the number of subjects in the in treatment group T should be
given in the first element and the number of subjects in the threatment
group R in the second.
If given with one element, the total n1
should be even.
Ratio T/R to be used in decision scheme (power calculations in and sample size estimation for ).
Coefficient of variation of the total variability
(use e.g., 0.3 for 30%)
Can be a vector with two elements. In that case CV[1]
is for
Test and CV[2]
for the Reference treatment.
Power threshold in the power monitoring steps and power to achieve in the sample size estimation step.
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
Defaults to "nct"
for speed reasons in function power.tsd.p()
as a reasonable compromise between speed and accuracy in the sample size
estimation step.
Defaults to "shifted"
in function power.tsd.pAF()
for
consistancy with Fuglsang.
If TRUE
the sample size estimation step is done with MSE
and PE of .
Defaults to FALSE
i.e., the sample size is estimated with
GMR
and MSE (calculated from CV
) of
analogous to Potvin et. al.
NB: The power inspection steps in the Potvin methods are always done with the
GMR
argument and MSE (CV
) of
.
Futility criterion. If set to a finite value, all studies simulated in which a
sample size >Nmax
is obtained will be regarded as BE=FAIL.
Set this argument to Inf
, the default, to work without that futility
criterion.
Test on which the CI calculations are based on.
Defaults to "welch"
= Welch<U+2019>s t-test accounting for
heteroscedasticity in the variabilities of Test and Reference, but neglecting
stage effects.
"anova"
calculates the
confidence interval based on an ANOVA with treatment and stage
in the model.
"t-test"
calculates the
confidence interval based on the t-test assuming equal
variabilities of Test and Reference and neglecting stage effects.
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.
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 or outside 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. Defaults to FALSE
.
Returns an object of class "pwrtsd"
with all the input arguments and results
as components.
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 continuing to .
Mean of n(total).
Range (min, max) of n(total).
Percentiles of the distribution of n(total).
Object of class "table"
summarizing the discrete distribution of
n(total) via its distinct values and counts of occurences of these values.
This component is only given back if usePE==FALSE
or otherwise if
is.finite(Nmax)
, i.e., a futility criterion is used.
The calculations follow in principle the simulations as described by Fuglsang. The underlying subject data are assumed to be evaluated after log-transformation. But instead of simulating subject data the statistics (mean and variance of Test and Reference of and ) are simulated via their associated distributions (normal and ).
Fuglsang A. Sequential Bioequivalence Approaches for Parallel Design. AAPS J. 2014; 16(3):373--8. 10.1208/s12248-014-9571-1
Potvin D, DiLiberti CE, Hauck WW, Parr AF, Schuirmann DJ, Smith RA. Sequential design approaches for bioequivalence studies with crossover designs. Pharm Stat. 2008; 7(4):245--62. 10.1002/pst.294
power.2stage
for analogous calculations for the 2<U+00D7>2 crossover.
# NOT RUN {
# using all the defaults
power.tsd.p(n1=48, CV=0.25)
# }
Run the code above in your browser using DataLab