### Name: forwsim
### Title: Forward Simulation to evaluate sequential boundaries in 1 group
###   binomial design.
### Aliases: forwsim
### Keywords: ~kwd1

### ** Examples


dir <- 'c:/projects/forwsim'                                            #set directory where results will be saved

# run forward simulation
forwsim(dta.N=2,th.u=1,th.v=1,th.au=3,th.bu=1,th.av=3,th.bv=1,dsg.uth=0,dsg.hyper=TRUE,dsg.pool=TRUE,dsg.logsd=FALSE,dsg.kini=1,
dsg.c0=0,dsg.c1=1,dsg.c2=10000,dsg.p0=0.5,dsg.a=.05,dsg.b=.1,dsg.s0=.05,dsg.s1=.1,mc.nsim=1,mc.nt=100,mc.pk=c(.7,.2,.05,.05),
b0grid=c(.5,.9,20),b1grid=c(.7,1.7,20),b2grid=c(0,.8,20),uhat.bsave=c(8,5,14),dir)

sim1 <- read.forwsim(dir)                                               #read forward simulation results

opt1 <- optbound(sim1,errImax=1,errIImax=1,util='u',smooth=FALSE)       #unconstrained optimization




