[ADMB Users] How to extract the 'real' Hessian from XXX.hes file
Johnoel Ancheta
johnoel at hawaii.edu
Wed Feb 29 13:23:31 PST 2012
See http://www.admb-project.org/svn/trunk/src/nh99/mod_hess.cpp
void function_minimizer::hess_inv(void)
On Tue, Feb 21, 2012 at 5:32 PM, James Thorson <JimThor at uw.edu> wrote:
> 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
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at admb-project.org
> http://lists.admb-project.org/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.admb-project.org/pipermail/users/attachments/20120229/825ebc0d/attachment.html>
More information about the Users
mailing list