[R] Numerical stability of eigenvalue and hessian matrix in R

JS Huang js.huang at protective.com
Wed Feb 18 15:13:26 CET 2015


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.



More information about the R-help mailing list