optimize_parameter(fun = est_power, opt1, opt2, opt1Value, opt2Value, main, ...)
#Optimization for power estimation
result<-optimize_parameter(fun=est_power,opt1="n",opt2="lambda0",opt1Value=c(3,5,10,15,20),opt2Value=c(1:5,10,20))
#Optimization for sample size estimation
## Not run:
# result<-optimize_parameter(fun=sample_size,opt1="lambda0",opt2="phi0",opt1Value=c(1,3,5),opt2Value=c(1.5,2,3),power=0.8)
# ## End(Not run)
Run the code above in your browser using DataLab