[ADMB Users] How to extract the 'real' Hessian from XXX.hes file

James Thorson JimThor at uw.edu
Tue Feb 21 19:32:10 PST 2012


Hi all,

I've seen a question posted previously (e.g.
http://groups.google.com/group/admb-users/browse_thread/thread/e8ae05a7919a4d19),
but I've never seen an answer: How does one extract the hessian from the
.hes file in ADMB.

I'm attaching two simple examples.

First simple.tpl and simple.dat are taken from the ADMB examples webpage.
When run, the hessian can be extracted from the .hes in R using the
following commands

x<-file('admodel.hes','rb')
  nopar<-readBin(x,"integer",1)
  H<-matrix(readBin(x,"numeric",nopar*nopar),nopar)

When inverted, the square-root of the diagonals of the inverted-Hessian are
identical to the standard deviations in the STD file.

However, the simple_bounded.tpl and simple_bounded.dat differ only in
having bounds placed on the two parameters.  When run, the hessian in the
HES file has no obvious relation to the standard deviations in the STD
file.  I assume this is because of some transformation being done on
bounded parameters internally to ADMB.  I cannot identify the
transformation used by simply exploring the effect of changing the bounds.

It would be useful to extract the hessian from ADMB for two reasons:
1.  Using a generalized inverse for a non-positive-definite Hessian as a
sampling kernal for Metropolis MCMC a la Gill and King (2004:
http://artsci.wustl.edu/~jgill/papers/gill_king.pdf) either in the
REPORT_SECTION or externally
2.  Using ADMB computations of the hessian when using ADMB within a larger
model.

Does anyone know how to extract the "real" hessian from the HES file?

Thanks in advance,
Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.admb-project.org/pipermail/users/attachments/20120221/9edd9dbc/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SIMPLE.DAT
Type: application/octet-stream
Size: 178 bytes
Desc: not available
URL: <http://lists.admb-project.org/pipermail/users/attachments/20120221/9edd9dbc/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SIMPLE.TPL
Type: application/octet-stream
Size: 376 bytes
Desc: not available
URL: <http://lists.admb-project.org/pipermail/users/attachments/20120221/9edd9dbc/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SIMPLE_BOUNDED.DAT
Type: application/octet-stream
Size: 178 bytes
Desc: not available
URL: <http://lists.admb-project.org/pipermail/users/attachments/20120221/9edd9dbc/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SIMPLE_BOUNDED.TPL
Type: application/octet-stream
Size: 412 bytes
Desc: not available
URL: <http://lists.admb-project.org/pipermail/users/attachments/20120221/9edd9dbc/attachment-0003.obj>


More information about the Users mailing list