View source: R/exppower_noninf.R
exppower.noninf  R Documentation 
Calculates the socalled expected, i.e., unconditional, power for a variety of study designs used in bioequivalence studies.
exppower.noninf(alpha = 0.025, logscale = TRUE, theta0, margin, CV, n, design = "2x2", robust = FALSE, prior.type = c("CV", "theta0", "both"), prior.parm = list(), method = c("exact", "approx"))
alpha 
Significance level (onesided). Defaults here to 0.025. 
logscale 
Should the data be used on logtransformed or on original scale? 
theta0 
Assumed ‘true’ (or ‘observed’ in case of 
margin 
Noninferiority margin. 
CV 
In case of In case of crossover studies this is the withinsubject CV, in case of a parallelgroup design the CV of the total variability. 
n 
Number of subjects under study. 
design 
Character string describing the study design.
See 
robust 
Defaults to FALSE. Set 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 
This function calculates the socalled expected power taking into account that
usually the parameters (CV and/or theta0) are not known but estimated
from a prior study with some uncertainty. The expected power is an unconditional
power and can therefore be seen as probability for success. See references for
further details.
The prior.parm
argument is a list that can supply any of the following
components:
df
Error degrees of freedom from the prior trial (>4, maybe noninteger).
df = Inf
is allowed and for method = "exact"
the result will then
coincide with power.noninf(...)
.
Note: This corresponds to the df of both the CV and the difference of means.
SEM
Standard error of the difference of means from the prior trial; must always be on additive scale (i.e., usually logscale).
m
Number of subjects from prior trial. Specification is analogous to
the main argument n
.
design
Study design of prior trial. Specification is analogous to the
main argument design
.
For prior.parm
, the combination consisting of df
and SEM
requires a somewhat advanced knowledge of the prior trial (provided in the raw
output from for example the software SAS, or may be obtained via
emmeans
of package emmeans
. However, it has the
advantage that if there were missing data the exact degrees of freedom and
standard error of the difference can be used, the former possibly being
noninteger valued (e.g. if the KenwardRoger method was used).
Details on argument prior.type
:
CV
The expectation is calculated with respect to the Inversegamma distribution.
theta0
The expectation is calculated with respect to the conditional distribution theta0  σ^2 = s^2 of the posteriori distribution of (theta0, σ^2) from the prior trial.
both
The expectation is calculated with respect to the posteriori
distribution of (theta0, σ^2) from the prior trial. Numerical calculation
of the twodimensional integral is performed via cubature::hcubature
.
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 vs. H1: theta0 > margin
where theta0 = mean(test)mean(reference)
if logscale=FALSE
or
H0: log(theta0) <= log(margin) vs. 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 vs. H1: theta0 < margin
where theta0 = mean(test)mean(reference)
if logscale=FALSE
or
H0: log(theta0) >= log(margin) vs. H1: log(theta0) < log(margin)
where theta0 = mean(test)/mean(reference)
if logscale=TRUE
.
This latter case may also be considered as ‘nonsuperiority’.
Value of expected power according to the input.
B. Lang, D. Labes
Grieve AP. Confidence Intervals and Sample Sizes. Biometrics. 1991;47:1597–603. doi: 10.2307/2532411
O’Hagan, Stevens, JW, Campell MJ. Assurance in Clinical Trial Design. Pharm Stat. 2005;4:187–201. 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. doi: 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 linearfixed effects model for clinical crossover trials. Biom J. 2016;58(4):797–809. doi: 10.1002/bimj.201500245
Box GEP, Tiao GC. Bayesian Inference in Statistical Analysis. Boston: AddisonWesley; 1992.
Held L, Sabanes Bove D. Applied Statistical Inference. Likelihood and Bayes. Berlin, Heidelberg: Springer; 2014. doi: 10.1007/9783642378874
Senn S. Crossover Trials in Clinical Research. Chichester: John Wiley & Sons; 2^{nd} 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. doi: 10.1002/cpt.257
expsampleN.noninf, power.noninf
# Expected power for noninferiority test for a 2x2 crossover # with 40 subjects. CV 30% known from a pilot 2x2 study with # 12 subjects # using all the defaults for other parameters (theta0 carved in stone) # should give: [1] 0.6761068 exppower.noninf(CV = 0.3, n = 40, prior.parm = list(df = 122)) # or equivalently exppower.noninf(CV = 0.3, n = 40, prior.parm = list(m = 12, design = "2x2")) # May be also calculated via exppower.TOST() after setting upper acceptance limit # to Inf and alpha=0.025 exppower.TOST(CV = 0.3, n = 40, prior.parm = list(df = 10), theta2 = Inf, alpha=0.025) # In contrast: Julious approximation exppower.noninf(CV = 0.3, n = 40, prior.parm = list(df = 10), method = "approx") # should give: [1] 0.6751358 # Compare this to the usual (conditional) power (CV known, "carved in stone") power.noninf(CV = 0.3, n = 40) # should give: [1] 0.7228685 # same as if setting df = Inf in function exppower.noninf() exppower.noninf(CV = 0.3, n = 40, prior.parm = list(df = Inf)) # Expected power for a 2x2 crossover with 40 subjects # CV 30% and theta0 = 0.95 known from a pilot 2x2 study with 12 subjects # using uncertainty with respect to both CV and theta0 exppower.noninf(CV = 0.3, theta0 = 0.95, n = 40, prior.parm = list(m = 12, design = "2x2"), prior.type = "both") # should give a decrease of expected power to 0.5982852
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.