[Rd] optim(…, method=‘L-BFGS-B’) stops with an error message while violating the lower bound
Spencer Graves
spencer.graves at prodsyse.com
Sat Oct 8 23:43:37 CEST 2016
Hi, Ravi:
Thanks. I got the following:
> optimx.out[order(optimx.out$value),
+ c('Q.lvl', 'Q.slope', 'H', 'value', 'kkt1', 'kkt2')]
Q.lvl Q.slope H
nlminb 0.001806087 0.000000e+00 0.000000e+00
nmkb 0.001806177 6.924995e-13 1.563012e-12
L-BFGS-B 0.001939930 -1.084202e-19 0.000000e+00
spg 0.001422563 2.308140e-01 0.000000e+00
bobyqa 0.001423449 9.622976e-01 0.000000e+00
hjkb 1.000000000 1.000000e+00 1.000000e+00
Rcgmin NA NA NA
Rvmmin NA NA NA
value kkt1 kkt2
nlminb -3.869081e+02 FALSE TRUE
nmkb -3.869081e+02 FALSE FALSE
L-BFGS-B -3.866286e+02 FALSE TRUE
spg -3.010668e+02 FALSE FALSE
bobyqa -2.726830e+02 FALSE FALSE
hjkb 3.515507e+02 NA NA
Rcgmin 8.988466e+307 NA NA
Rvmmin 8.988466e+307 NA NA
'L-BFGS-B' returned the same violation of the constraint that
lower = 0 as before. 'nlminb' and 'nmkb' got essentially the same
answer, but neither seemed confident they had the minimum. 'nmkb'
reported the same 'value' as 'nlminb', but the parameter values were at
the boundary for nlminb and not for nmkb. When I started optimx with
nlminb, the first 5 decided that was the best and the last 3 failed, as
before.
I've added this to my vignette on this.
Thanks,
Spencer Graves
On 10/8/2016 2:29 PM, Ravi Varadhan wrote:
> Have you tried "optimx" package that John Nash and I wrote? The main > purpose is to be able to readily compare multiple optimizers on a >
particular class of problems and see which one seems to do the best. >
It doesn't include nloptr, but most other optimizers are there. > > Ravi
________________________________________ From: R-devel >
<r-devel-bounces at r-project.org> on behalf of Spencer Graves >
<spencer.graves at prodsyse.com> Sent: Saturday, October 8, 2016 2:50 > PM
To: R-devel Subject: [Rd] optim(
, method=L-BFGS-B) stops with > an
error message while violating the lower bound > > Hello: > > > The
development version of Ecdat on R-Forge contains a vignette in > which
optim(
, method=L-BFGS-B) stops with an error message while >
violating the lower bound. > > > To see all the details, try the
following: > > > install.packages("Ecdat",
repos="http://R-Forge.R-project.org") > > > Then do "help(pac=Ecdat)" ->
"User guides, package vignettes and > other documentation" ->
"Ecdat::AverageIncomeModels". > > > I've found other optimizers that
will get around the problem in this > case but none that performs as
well as optim with many other > problems. > > > Thanks, Spencer Graves >
> > p.s. I've also tested bobyqa{minqa} or nloptr{nloptr}, recommended
> in a vignette in the lme4 package. These did better than optim in >
this example but worse in others I tried. > >
______________________________________________ R-devel at r-project.org >
mailing list https://stat.ethz.ch/mailman/listinfo/r-devel >
[[alternative HTML version deleted]]
More information about the R-devel
mailing list