power.tsd.ssr {Power2Stage}R Documentation

Power of 2-stage BE studies in 2x2 crossover designs with interim sample size re-estimation

Description

This function calculates the ‘empiric’ power (via simulations) of 2-stage BE studies with interim sample size re-estimation (i.e., but no BE decision after stage 1). The sample size re-estimation can be done blinded or unblinded.

Usage

power.tsd.ssr(alpha = 0.05, n1, GMR, CV, targetpower = 0.8,
              pmethod = c("nct", "exact", "shifted", "ls"), blind = FALSE,
              usePE = FALSE, min.n = 0, max.n = Inf, theta0, theta1, theta2,
              npct = c(0.05, 0.5, 0.95), nsims, setseed = TRUE, details = FALSE)

Arguments

alpha

Nominal type I error. Has to be adjusted in case of inflation of the Type I Error.

n1

Sample size of stage 1.

GMR

Ratio T/R to be used in the sample size re-estimation.
Defaults to 0.95 if missing.

CV

Coefficient of variation of the intra-subject variability (use e.g., 0.3 for 30%).
Anticipated population value.

targetpower

Power to achieve in the sample size estimation step.

pmethod

Power calculation method to be used in the sample size re-estimation for stage 2.
Implemented are ⁠"nct"⁠ (approximate calculations via non-central t-distribution, ⁠"exact"⁠ (exact calculations via Owen’s Q), and ⁠"shifted"⁠ (approximate calculation via shifted central t-distribution.
Also implemented is the large sample approximation as used in the references.
Defaults to ⁠"nct"⁠ as a reasonable compromise between speed and accuracy in the sample size estimation step.

blind

If ⁠TRUE⁠ the blinded estimate of the intra-subject variance, i.e., the estimate from the period differences, is used in sample size estimation.
If ⁠FALSE⁠ the usual MSE from stage 1 is used.
Defaults to ⁠FALSE⁠ since most BE studies are open.

usePE

If ⁠TRUE⁠ the point estimate from the interim analysis is used in the sample size re-estimation. Defaults to ⁠FALSE⁠.
⁠usePE = TRUE⁠ doesn’t make sense if ⁠blind = TRUE⁠. In that case the function issues a warning and ⁠usePE⁠ is reset to ⁠usePE = FALSE⁠.

min.n

If ⁠min.n>n1⁠, the re-estimated sample size (⁠N⁠) is set to ⁠max(min.n,N)⁠.
If ⁠min.n=0⁠ (the default), no minimal sample size is applied.

max.n

If ⁠max.n⁠ is set to a finite value the re-estimated sample size (⁠N⁠) is set to ⁠min(max.n,N)⁠.
Defaults to ⁠Inf⁠ which is equivalent to not constrain the re-estimated sample size.
Attention! ⁠max.n⁠ is here not a futility criterion like ⁠Nmax⁠ in other functions of this package.

theta0

Assumed ratio of geometric means (T/R) for simulations. If missing, defaults to ⁠GMR⁠.

theta1

Lower bioequivalence limit. Defaults to 0.8.

theta2

Upper bioequivalence limit. Defaults to 1.25.

npct

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.

nsims

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⁠.

setseed

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.

details

If set to ⁠TRUE⁠ the function prints the results of time measurements of the simulation steps. Defaults to ⁠FALSE⁠.

Details

The calculations follow in principle the simulations as described in Potvin et al.
The underlying subject data are assumed to be evaluated after log-transformation. But instead of simulating subject data, the statistics pe1, mse1 and pe2, SS2 are simulated via their associated distributions (normal and χ2 distributions).

Value

Returns an object of class class ⁠"pwrtsd"⁠ with all the input arguments and results as components.
The class class ⁠"pwrtsd"⁠ has a S3 print method.
The results are in the components:

pBE

Fraction of studies found BE.

pct_s2

Percentage of studies continuing to stage 2.

nmean

Mean of n(total).

nrange

Range (min, max) of n(total).

nperc

Percentiles of the distribution of n(total).

ntable

Object of class ⁠"table"⁠ summarizing the discrete distribution of n(total) via its unique values and counts of occurences of these values.
ntable is only given back if ⁠usePE = FALSE⁠

Note

The computation time is in the magnitude of a few seconds for 100,000 sim’s on my machine (Intel core i7 2.5 GHz, 12GB RAM) if the non-central t approximation is used. Thus be a bit patient if you simulate for the Tpye I Error 'alpha' with 1 Mio sim’s.
Using the crude ⁠pmethod="ls"⁠ on the other hand results in a nearly immediate sample size re-estimation.

Author(s)

D. Labes

References

Golkowski D, Friede T, Kieser M. Blinded sample size re-estimation in crossover bioequivalence trials.
Pharm Stat. 2014; 13(3):157–62. doi: 10.1002/pst.1617

Jones B, Kenward MG. Design and Analysis of Cross-Over Trials.
Boca Raton: CRC Press; 3rd edition 2014. Chapter 12.

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. doi: 10.1002/pst.294

See Also

power.tsd for 2-stage studies with interim BE decision.

Examples

# Not run to comply with CRAN policy about examples' run-time;
# minimum number of sim's should be 1E5 for 'power', 1E6 sim's for 'alpha'
## Not run: 
power.tsd.ssr(alpha=0.05, n1=10, GMR=1, CV=0.239, targetpower=0.9,
              pmethod="ls", blind=TRUE, theta0=1.25)
# should give an alpha-inflation 0.072359 (run time <5 seconds)
# repeated with noncentral t-approximation
power.tsd.ssr(alpha=0.05, n1=10, GMR=1, CV=0.239, targetpower=0.9,
              pmethod="nct", blind=TRUE, theta0=1.25)
# should give an alpha-inflation 0.069789 (run time ~20 seconds)
#
# adjusted alpha to control the Type I Error, noncentral t-approx.
power.tsd.ssr(alpha=0.03505, n1=10, GMR=1, CV=0.239, targetpower=0.9,
              pmethod="nct", blind=TRUE, theta0=1.25)
# should control the TIE with 0.049877
## End(Not run)

[Package Power2Stage version 0.5-4 Index]