Re: [R] hessian fails for box-constrained problems when close to boundary?

2012-11-17 Thread Paul Gilbert
Matthieu (regarding the final question, but not the ones before that.) The short answer is that you seem to have a solution, since hessian in numDeriv works. The long answer follows. Outside a constraint area one cannot assume that a function will evaluate properly. Some constraints are

[R] hessian fails for box-constrained problems when close to boundary?

2012-11-15 Thread Matthieu Stigler
Hi I am trying to recover the hessian of a problem optimised with box-constraints. The problem is that in some cases, my estimates are very close to the boundary, which will make optim(..., hessian=TRUE) or optimHessian() fail, as they do not follow the box-constraints, and hence estimate the