### Name: optbound
### Title: Find optimal boundaries
### Aliases: optbound
### Keywords: ~kwd1 ~kwd2

### ** Examples


dir <- 'C:/R/R-2.2.1/library/forwsim/data'                                                 #read forward simulation output
sim1 <- read.forwsim(dir)

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

opt3 <- optbound(sim1,errImax=1,errIImax=1,util='u',smooth=TRUE,span=seq(.02,.15,.01))     #optimize smooth surface
opt4 <- optbound(sim1,errImax=.1,errIImax=.2,util='u',smooth=TRUE,span=seq(.02,.15,.01))   #constrained optimization of smooth surface

opt5 <- optbound(sim1,errImax=.05,errIImax=.15,util='dt',max=FALSE,smooth=FALSE)           #minimize E(sample size) s.t. type I&II error constraints




