# calculate empirical power and type I error given design parameters
Sim(shape=1, S0=0.62, S1=0.62^(0.467), x0=2, tf=2, rate=5, t1=3.0593,
c1=-0.302, c=1.6135, n1=16, n=26, N=10000, seed=5868)
# empirical power
# 0.813
Sim(shape=1, S0=0.62, S1=0.62, x0=2, tf=2, rate=5, t1=3.0593,
c1=-0.302, c=1.6135, n1=16, n=26, N=10000, seed=5868)
# empirical type-I error
# 0.037
Run the code above in your browser using DataLab