I=c(0.2,0.4,0.6,0.8,0.99)
beta=0.2
betaspend=c(0.1,0.2,0.3,0.3,0.2)
alpha=0.05
p_0=0.3
p_1=0.5
K=4.6
tol=1e-6
tt1=asymdesign(I,beta,betaspend,alpha,p_0,p_1,K,tol)
tt2=exactdesign(tt1)
tt3=exactprob(p_1=c(0.4,0.5,0.6,0.7,0.8,0.9),d=tt2)
exactcp(tt2,p_1=c(0.4,0.5,0.6,0.7,0.8,0.9),1,2)
exactcp(tt3,p_1=c(0.4,0.5,0.6,0.7,0.8,0.9),3,19)
Run the code above in your browser using DataLab