PowerTOST (version 1.4-9)

expsampleN.TOST: Sample size based on expected power

Description

Calculates the sample size based on the expected power for a variety of study designs used in bioequivalence studies. See known.designs for the study designs covered.

Usage

expsampleN.TOST(alpha = 0.05, targetpower = 0.8, logscale=TRUE, theta0, 
                theta1, theta2, CV, design = "2x2", robust = FALSE, 
                prior.type = c("CV", "theta0", "both"), prior.parm = list(),
                method = c("exact", "approx"), print = TRUE, details)

Arguments

alpha

Significance level (one-sided). Commonly set to 0.05.

targetpower

Power to achieve at least. Must be >0 and <1. Typical values are 0.8 or 0.9.

logscale

Should the data used on log-transformed or on original scale? TRUE (default) or FALSE.

theta0

Assumed ‘true’ (or ‘observed’ in case of prior.type != "CV") bioequivalence ratio or difference. Typically set to 0.95 (default if missing) if logscale=TRUE. Defaults to 0.05 if logscale=FALSE.

theta1

Lower bioequivalence limit as ratio if logscale=TRUE or as difference. Can be missing. Defaults then to 0.8 if logscale=TRUE or to -0.2 if logscale=FALSE.

theta2

Upper bioequivalence limit as ratio if logscale=TRUE or as difference. If not given theta2 will be calculated as 1/theta1 if logscale=TRUE, else as -theta1.

CV

Assumed true or observed coefficient of variation as ratio (not percent). Only values > 0 are allowed. If prior.type="CV" may be given as vector: The CVs are then pooled (as a weighted mean with their degrees of freedoms as weights).

design

Character string describing the study design. See known.designs for designs covered in this package.

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<U+2019>s basic estimator). These df are calculated as n-seq. See known.designs()$df2 for designs covered in this package.

prior.type

Specifies which parameter uncertainty should be accounted for. In case of prior.type = "CV" (the default), only the uncertainty with respect to the CV will be considered (i.e., the given treatment effect is assumed to be fix). In case of prior.type = "theta0" only uncertainty with respect to the treatment ratio/difference will be accounted for (i.e., the given CV is assumed to be fix). In case of prior.type = "both" the power value will be unconditional with respect to both the CV and theta0.

prior.parm

A list of parameters expressing the prior information about the variability and/or treatment effect. Possible components are df, SEM, m, design. For prior.type = "CV" the degrees of freedom from the prior trial are required. This information can be provided by specifying the single component df or the combination consisting of m and design. For prior.type = "theta0" the standard error of the treatment difference from the prior trial is required. This information can be provided by specifying the single component SEM or the combination consisting of m and design. For prior.type = "both" the degrees of freedom and the standard error of the treatment difference are required. This information can be provided by specifying the combination consisting of df and SEM or via the combination m and design. See 'Details' for a technical description on each component.

method

Defaults to method="exact". In that case the expected power will be calculated as expected value of the power with respect to the (prior) distribution of the respective parameter(s). Set to method="approx" the expected power according to the approximate formulas given in the book from Julious or in the Julious/Owen paper will be calculated (using non-central t); this only affects prior.type = "CV".

print

If TRUE (default) the function prints its results. If FALSE only a data.frame with the results will be returned.

details

If TRUE the design characteristics and the steps during sample size calculations will be shown. If not specified, the default value is FALSE for prior.type != "both" and TRUE otherwise.

Value

A data.frame with the input values and the result of the sample size estimation. The Sample size column contains the total sample size in case of all designs implemented.

Details

The sample size is calculated based on iterative evaluation of expected power. The starting value of the sample size search is taken from a large sample approximation if prior.type = "CV". Else an empirical start value is obtained. Note that in case of prior.type = "both" the calculation may still take several seconds.

Note also that the expected power is always bounded above by the so-called probability of technical success (PTS) which may be a value less than 1. Therefore, it may be possible that it is either not possible to calculate the required sample size at all or that the sample size gets very large if the given targetpower is less but close to the PTS.

References

Grieve AP. Confidence Intervals and Sample Sizes. Biometrics. 1991;47:1597--603. 10.2307/2532411

O<U+2019>Hagan, Stevens, JW, Campell MJ. Assurance in Clinical Trial Design. Pharm Stat. 2005;4:187--201. 10.1002/pst.175

Julious SA, Owen RJ. Sample size calculations for clinical studies allowing for uncertainty in variance. Pharm Stat. 2006;5:29--37. 10.1002/pst.197

Julious SA. Sample sizes for Clinical Trials. Boca Raton: CRC Press / Chapman & Hall; 2010.

Bertsche A, Nehmitz G, Beyersmann J, Grieve AP. The predictive distribution of the residual variability in the linear-fixed effects model for clinical cross-over trials. Biom J. 2016;58(4):797--809. 10.1002/bimj.201500245

Box GEP, Tiao GC. Bayesian Inference in Statistical Analysis. Boston: Addison-Wesley; 1992.

Held L, Sabanes Bove D. Applied Statistical Inference. Likelihood and Bayes. Berlin, Heidelberg: Springer; 2014. 10.1007/978-3-642-37887-4

Senn S. Cross-over Trials in Clinical Research. Chichester: John Wiley & Sons; 2 edition 2002.

Zierhut ML, Bycott P, Gibbs MA, Smith BP, Vicini P. Ignorance is not bliss: Statistical power is not probability of trial success. Clin Pharmacol Ther. 2015;99:356--9. 10.1002/cpt.257

See Also

exppower.TOST, known.designs, sampleN.TOST

Examples

Run this code
# NOT RUN {
# Classical 2x2 cross-over, target power = 80%,
# BE limits 80 ... 125%, assumed true BE ratio = 95%,
# intra-subject CV=30% estimated from prior 2x2 trial 
# with m = 30 subjects
expsampleN.TOST(CV=0.3, prior.parm = list(m = 30, design = "2x2"))
# -> gives n = 42 with achieved expected power 0.806262
# Compare this to the usual sample size with CV assumed known ('carved in stone')
sampleN.TOST(CV=0.3)
# -> gives n = 40 subjects
# Compare this to the case where uncertainty is accounted for CV and theta0
# Not run due to timing policy of CRAN - may run several seconds
# }
# NOT RUN {
expsampleN.TOST(CV=0.3, prior.parm = list(m = 30, design = "2x2"), 
                prior.type = "both")
# }
# NOT RUN {
# -> gives n = 72 subjects

# More than one CV with corresponding degrees of freedom 
# other settings as above in first example
CVs <- c(0.25, 0.3)
dfs <- c(22, 10)
expsampleN.TOST(CV=CVs, prior.parm = list(df = dfs))
# -> gives a pooled CV=0.2664927 with df=32
# and a sample size n=34 with achieved expected power 0.812653 exact
# achieved expected power 0.815019 approximate acc. Julious
# }

Run the code above in your browser using DataCamp Workspace