[R] Constrained Optimization

Hans W. Borchers hwborchers at gmail.com
Tue Aug 5 06:54:55 CEST 2008


 <alan.ng <at> gmx.net> writes:

> 
> Hello,
> 
> I am trying to run a constrained optimization in R. "constrOptim" is really 
> useful and has helped me a lot, but unfortunately, it doesn't provide the 
> hessian.  Is there a solution to this problem?

You didn't provide an example to understand why 'optim' doesn't solve your
problem. Perhaps you can find an optimal point with 'constrOptim' and then
compute the hessian at that point with some other R function, for instance
'numDeriv::hessian'.

//  Hans Werner Borchers
 
> I've tried "optim" with penalty-functions and "L-BFGS-B", but it doesn't help.
> 
> Alan.



More information about the R-help mailing list