power.TOST.sim(alpha = 0.05, logscale = TRUE, theta1, theta2, theta0, CV, n,
design = "2x2", robust = FALSE, setseed = TRUE, nsims = 1e+05)
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
.1/theta1
if logscale=TRUE
or as -theta1
if logscale=FALSE
.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
known.designs()
for designs covered in this package.TRUE
will use the degrees of freedom according to the 'robust' evaluation
(aka Senn's basic estimator). These df are calculated as n-seq
.
See set.seed(1234567)
is issued if setseed=TRUE
, the default.
Set this argument to
power.TOST
,# using the default design 2x2, BE range 0.8 ... 1.25, logscale, theta0=0.95
power.TOST.sim(alpha=0.05, CV=0.3, n=12)
# should give 0.15054, with nsims=1E6 it will be 0.148533
# exact analytical is
power.TOST(alpha=0.05, CV=0.3, n=12)
# should give 0.1484695
# very unusual alpha setting
power.TOST.sim(alpha=0.9, CV=0.3, n=12)
# should give the same (within certain precision) as
power.TOST(alpha=0.95, CV=0.3, n=12)
# or also within certain precision equal to
power.TOST(alpha=0.95, CV=0.3, n=12, method="mvt")
# SAS Proc Power gives here the incorrect value 0.60525
Run the code above in your browser using DataLab