Learn R Programming

PowerTOST (version 1.3-5)

sampleN.TOST: Sample size based on power of TOST

Description

Calculates the necessary sample size to have at least a given power.

Usage

sampleN.TOST(alpha = 0.05, targetpower = 0.8, logscale = TRUE, 
             theta0, theta1, theta2, CV, design = "2x2", method="exact", 
             robust=FALSE, print = TRUE, details = FALSE, imax=100)

Arguments

alpha
Type I error probability. Per convention mostly set to 0.05.
targetpower
Power to achieve at least. Must be >0 and
logscale
Should the data used on log-transformed or on original scale? TRUE or FALSE. Defaults to TRUE.
theta0
'True' or assumed bioequivalence ratio. In case of logscale=TRUE it must be given as ratio, otherwise as difference to 1. See examples. Defaults to 0.95 if logscale=TRUE or to 0.05 if logscale=FALSE.
theta1
Lower bioequivalence limit. In case of logscale=TRUE it is given as ratio, otherwise as diff. to 1. Defaults to 0.8 if logscale=TRUE or to -0.2 if logscale=FALSE.
theta2
Upper bioequivalence limit. If not given theta2 will be calculated as 1/theta1 if logscale=TRUE or as -theta1 if logscale=FALSE.
CV
Coefficient of variation as ratio.
design
Character string describing the study design. See known.designs() for designs covered in this package.
method
Method for calculation of the power. Defaults to "exact" in which case the calculation is done based on formulas with Owen's Q. The calculation via Owen's Q can also be choosen with method="owenq". Another exact method via direct use of t
robust
Defaults to FALSE. With that value the usual degrees of freedom will be used. Set to TRUE will use the degrees of freedom according to the 'robust' evaluation (aka Senn's basic estimator). These df are calculated as n-seq<
print
If TRUE (default) the function prints its results. If FALSE only the data.frame with the results will be returned.
details
If TRUE the design characteristics and the steps during sample size calculations will be shown. Defaults to FALSE.
imax
Maximum number of steps in sample size search. Defaults to 100. Adaption only in rare cases needed.

Value

  • A data.frame with the input and results will be returned. The "Sample size" column contains the total sample size.

Warning

The function does not vectorize properly. If you need sample sizes with varying CV's f.i. use for-loops or the apply-family.

Details

The sample size is calculated via iterative evaluation of power of the TOST procedure. Start value for the sample size search is taken from a large sample approximation according to Zhang, modified. The sample size is bound to 4 as minimum.

References

Phillips, K. F. (1990) "Power of the Two One-Sided Tests Procedure in Bioequivalence" J. of Pharmacokinetics and Biopharmaceutics, 18, 137-144. Diletti, D., Hauschke, D., and Steinijans, V. W. (1991) "Sample Size Determination for Bioequivalence Assessment by Means of Confidence Intervals" Int. J. of Clinical Pharmacology, Therapy and Toxicology, 29(1), 1-8 (1991) 30 Suppl.No.1, S51-58 (1992) Diletti, D., Hauschke, D., and Steinijans, V. W. (1992) "Sample size determination : Extended tables for the multiplicative model and bioequivalence ranges of 0.9 to 1.11 and 0.7 to 1.43" Int. J. of Clinical Pharmacology, Therapy and Toxicology, 30 Suppl.No.1, S59-62 Zhang P. "A Simple Formula for Sample Size Calculation in Equivalence Studies" J. Biopharm. Stat. 13(3), 529-538 (2003)

See Also

power.TOST, known.designs

Examples

Run this code
# Exact calculation for a classical 2x2 cross-over (TR/RT),
# BE limits 80 ... 125\%, assumed true BE ratio 0.95, intra-subject CV=30\%,
# using all the default values
# should give n=40 power=0.815845
sampleN.TOST(CV=0.3)

# Exact calculation for a parallel group design
# evaluation on the original (untransformed) scale
# BE limits 80 ... 120\% = -20\% ... +20\% of reference, 
# assumed true BE ratio 0.95\% = -5\% to reference mean,
# total CV=20\%
# should give n=48 (total) power=0.815435
sampleN.TOST(logscale=FALSE, theta1=-0.2, theta0=-0.05, CV=0.2, design="parallel")

# A rather strange setting of theta0! Have a look at n.
# It would be better this is not the sample size but the running total
# of my bank account. But the first million is the hardest ;-).
sampleN.TOST(CV=0.2, theta0=0.8005, theta1=0.8)

Run the code above in your browser using DataLab