Last chance! 50% off unlimited learning
Sale ends in
known.designs()
for the study designs covered.expsampleN.noninf(alpha = 0.025, targetpower = 0.8, logscale=TRUE,
theta0, margin, CV, dfCV, design = "2x2",
robust=FALSE, print = TRUE, details = FALSE, imax=100)
logscale=TRUE
or to -0.05 if
logscale=FALSE
.logscale=TRUE
it must be given as ratio, otherwise as diff.
Defaults to 0.8 if logscale=TRUE
or to -0.2 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 <exppower.noninf, expsampleN.TOST
# Classical 2x2 cross-over, target power = 80\%, alpha=0.025
# logscale=TRUE, 'non-superiority' margin 125\%, assumed true BE ratio = 105\%,
# intra-subject CV=30\% estimated with 10 df
# using all the defaults
expsampleN.noninf(theta0=1.05, margin=1.25, CV=0.3, dfCV=10)
# -> gives n=56 with achieved expected power 0.807719
# Compare this to the usual sample size with CV known as 'carved in stone'
sampleN.noninf(theta0=1.05, margin=1.25, CV=0.3)
# More then one CV with corresponding degrees of freedom
# other parameters as above
CVs <- c(0.25, 0.3)
dfs <- c( 22, 10)
expsampleN.noninf(theta0=1.05, margin=1.25, CV=CVs, dfCV=dfs)
# -> gives a pooled CV=0.2664927 with df=32
# and a sample size n=34 with achieved expected power 0.815019
Run the code above in your browser using DataLab