Re: [R] A question about optim function in R

2020-07-26 Thread Rasmus Liland
Dear Zixuan, On 2020-07-26 07:36 -0700, Jeff Newmiller wrote: > On July 26, 2020 7:33:32 AM PDT, Zixuan Qi wrote: > > Hi, > > > > I encounter a problem in R. My program is as follows. > > lower <- c(-Inf, -Inf, -Inf, -Inf, 0, 0, 0, -1, -1, -1) > > upper <- c(Inf, Inf, Inf, Inf, Inf, Inf, Inf, 1,

Re: [R] A question about optim function in R

2020-07-26 Thread J C Nash
For this and the nlminb posting, a reproducible example would be useful. The optimx package (I am maintainer) would make your life easier in that it wraps nlminb and optim() and other solvers, so you can use a consistent call. Also you can compare several methods with opm(), but do NOT use this fo

Re: [R] A question about optim function in R

2020-07-26 Thread Jeff Newmiller
This is not reproducible. [1] http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example [2] http://adv-r.had.co.nz/Reproducibility.html [3] https://cran.r-project.org/web/packages/reprex/index.html (read the vignette) On July 26, 2020 7:33:32 AM PDT, Zixuan Qi w