Dear Sir,
I am working with one example  in R donlp2. How I can get the Hessian matrix
from the output.
p = c(10,10)
par.l = c(-100,-100)
par.u = c(100,100)
nlin.l = nlin.u = 2
fn = function(x) {
  x[1]^2+x[2]^2
}
dfn = function(x){
 c(2*x[1], 2*x[2])
}
attr(fn, "gr") = dfn
nlcon = function(x){
  x[1]*x[2]
}
dnlcon = function(x){
   c(x[2], x[1])
}
attr(nlcon, "gr") = dnlcon
donlp2.control = function(hessian = TRUE)
ret = donlp2(p, fn, par.u=par.u, par.l=par.l, nlin=list(nlcon),
nlin.u=nlin.u, nlin.l=nlin.l,control = donlp2.control())


Thanks,
-- 
Chirackel Ahammed Yoonus
Research Associate,  Center for Advanced Financial Studies,
Institute for Financial Management and Research,  Chennai, India - 600034
+91-44-28303 531, +91-9840377561
email : kala...@gmail.com,  skype : cayoonus

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to