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.