Skip to content
Prev 387533 / 398502 Next

Optimization function producing negative parameter values

Does optim go out of bounds when you specify hessian=FALSE?
hessian=TRUE causes some out-of-bounds evaluations of f.
[1] 1 1
[1] 1.001 1.000
[1] 0.999 1.000
[1] 1.000 1.001
[1] 1.000 0.999
[1] 0.001 1.500
[1] 0.002 1.500
[1] 0.001 1.500
[1] 0.001 1.500
[1] 0.001 1.499
[1] 0.003 1.500
[1] 0.001 1.500
[1] 0.002 1.501
[1] 0.002 1.499
[1] 0.001 1.500
[1] -0.001  1.500
[1] 0.000 1.501
[1] 0.000 1.499
[1] 0.002 1.501
[1] 0.000 1.501
[1] 0.001 1.502
[1] 0.001 1.500
[1] 0.002 1.499
[1] 0.000 1.499
[1] 0.001 1.500
[1] 0.001 1.498
$par
    X     Y
0.001 1.500

$value
[1] 1.066506
On Sun, Mar 21, 2021 at 10:22 AM Shah Alam <dr.alamsolangi at gmail.com> wrote: