View source: R/expSampleSize_noninf.R
expsampleN.noninf | R Documentation |
Estimates the sample size based on the expected power for a variety of designs used in bioequivalence studies. See known.designs for the study designs covered.
expsampleN.noninf(alpha = 0.025, targetpower = 0.8, logscale = TRUE,
theta0, margin, CV, design = "2x2", robust = FALSE,
prior.type = c("CV", "theta0", "both"), prior.parm = list(),
method = c("exact", "approx"), print = TRUE, details)
alpha |
Significance level (one-sided). Defaults here to 0.025. |
targetpower |
Power to achieve at least. Must be |
logscale |
Should the data used on log-transformed or on original scale?
|
theta0 |
Assumed ‘true’ (or ‘observed’ in case of |
margin |
Non-inferiority margin. |
CV |
In case of If In case of cross-over studies this is the within-subject CV, in case of a parallel-group design the CV of the total variability. |
design |
Character string describing the study design. |
robust |
Defaults to |
prior.type |
Specifies which parameter uncertainty should be accounted for.
In case of |
prior.parm |
A list of parameters expressing the prior information about the
variability and/or treatment effect. Possible components are |
method |
Defaults to |
print |
If |
details |
If |
The sample size is estimated 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.
Notes on the underlying hypotheses
If the supplied margin is < 0
(logscale=FALSE
) or
< 1
(logscale=TRUE
), then it is assumed higher response
values are better. The hypotheses are
H0: theta0 <= margin
H1: theta0 > margin
where theta0 = mean(test)-mean(reference)
if logscale=FALSE
or
H0: log(theta0) <= log(margin)
H1: log(theta0) > log(margin)
where theta0 = mean(test)/mean(reference)
if logscale=TRUE
.
If the supplied margin is > 0
(logscale=FALSE
) or
> 1
(logscale=TRUE
), then it is assumed lower response
values are better. The hypotheses are
H0: theta0 >= margin
H1: theta0 < margin
where theta0 = mean(test)-mean(reference)
if logscale=FALSE
or
H0: log(theta0) >= log(margin)
H1: log(theta0) < log(margin)
where theta0 = mean(test)/mean(reference)
if logscale=TRUE
.
This latter case may also be considered as ‘non-superiority’.
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.
B. Lang, D. Labes
Grieve AP. Confidence Intervals and Sample Sizes. Biometrics. 1991;47:1597–603. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.2307/2532411")}
O’Hagan, Stevens, JW, Campell MJ. Assurance in Clinical Trial Design. Pharm Stat. 2005;4:187–201. \Sexpr[results=rd]{tools:::Rd_expr_doi("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. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1002/pst.197")}
Julious SA. Sample sizes for Clinical Trials. Boca Raton: CRC Press; 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. \Sexpr[results=rd]{tools:::Rd_expr_doi("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. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/978-3-642-37887-4")}
Senn S. Cross-over Trials in Clinical Research. Chichester: John Wiley & Sons; 2nd 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. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1002/cpt.257")}
exppower.noninf, known.designs, sampleN.noninf
# Classical 2x2 cross-over, target power = 80%,
# assumed true ratio = 95%, margin = 0.8,
# intra-subject CV=30% estimated from prior 2x2 trial
# with m = 12 subjects
expsampleN.noninf(theta0 = 0.95, margin = 0.8, CV = 0.3, design = "2x2",
prior.parm = list(m = 12, design = "2x2"))
# gives n = 58 with achieved expected power 0.809148
# Compare this to the usual sample size with CV assumed
# as 'carved in stone'
sampleN.noninf(theta0 = 0.95, margin = 0.8, CV = 0.3)
# Perform 'non-superiority' (lower is better) with assumed
# true ratio = 105% and margin 125%
expsampleN.noninf(theta0 = 1.05, margin = 1.25, CV = 0.3, design = "2x2",
prior.parm = list(m = 12, design = "2x2"))
# should give n = 56 with achieved expected power 0.806862
# 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.noninf(theta0 = 0.95, margin = 0.8, CV = CVs,
prior.parm = list(df = dfs))
# should give a pooled CV=0.2664927 with 32 df and a sample
# size n=42 with achieved expected power 0.814073 exact
# achieved expected power 0.816163 approximate acc. to Julious
# Uncertainty is accounted for CV and theta0
expsampleN.noninf(CV = 0.3, prior.type = "both",
prior.parm = list(m = 12, design = "2x2"))
# gives a dramatic increase in sample size (n = 194)
# due to small pilot trial
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.