Hi,
Since all entries in your hessian matrix and grad vector are integers, I
suggest you execute the following for mat assignment.
> mat <- round(h_x(x),digits=0)*round(hess.h,digits=0) - round(grad(h_x,
> x),digits=0) %o% round(grad(h_x, x),digits=0)
> mat
[,1] [,2] [,3] [,4]
[1,] 0 0 0 -4080400
[2,] 0 7920000 0 -1600000
[3,] 0 0 12160400 0
[4,] -4080400 -1600000 0 -7920000
--
View this message in context:
http://r.789695.n4.nabble.com/Numerical-stability-of-eigenvalue-and-hessian-matrix-in-R-tp4703443p4703456.html
Sent from the R help mailing list archive at Nabble.com.
______________________________________________
[email protected] mailing list -- To UNSUBSCRIBE and more, see
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.