# 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 other defaults
expsampleN.noninf(theta0=1.05, margin=1.25, CV=0.3, dfCV=10)
# -> gives n=56 with achieved expected power 0.0.806862
# 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=40 with achieved expected power 0.806073 exact
# sample size n=40 with achieved expected power 0.808157 acc. to Julious/Owen
Run the code above in your browser using DataLab