# using all the defaults, i.e. crossover design, alpha=0.05
# theta1=0.8, theta2=1.25 but true slope slightly off 1
sampleN.dp(CV=0.2, doses=c(1, 2, 8), beta0=1.02)
# should give n=18, power=0.854528
# incomplete block design mentioned in Sethuraman et al.
# with 5 doses, 20 sequences, 3 periods
# (I hope at least that the design is that they used)
library(crossdes)
# IBD based on mutually orthogonal Latin squares
ibd <- des.MOLS(trt=5, k=3)
CVb <- mse2CV(0.8) # Sethuraman et al. omega squared
sampleN.dp(CV=0.2, doses=c(5, 25, 50, 100, 200), beta0=1, design="IBD", dm=ibd, CVb=CVb)
# power of that design near 90% with n=30, sequence group unbalanced
power.dp(CV=0.2, doses=c(5, 25, 50, 100, 200), n=30, beta0=1, design="IBD", dm=ibd, CVb=CVb)
Run the code above in your browser using DataLab