[ADMB Users] "Hessian does not appear to be positive definite"

Sylvain Bonhommeau sylvain.bonhommeau at gmail.com
Thu Apr 23 11:12:35 PDT 2009


Hi,

I want to test the ability of my procedure to estimate parameters so I
simulated data with known parameters. As you mentioned previously, when
there is no errors, it is not possible to get the standard deviation.
However in the .par file, the value of parameters are almost perfect. The
problem is when I add a small noise to my simulated data, i.e. multiplying
by a random variable normally distributed with mean=1 and sd=0.01, the
estimated parameters are not the one I chose...

I attach the .tpl, .pin and the two .dat file (without and with error) as
well as the R script to simulate the data.

(this is a simplified version of the model I sent you before)


Thanks for your help,

Sylvain



2009/4/9 dave fournier <otter at otter-rsch.com>

> I think we should keep this on the list as these are issures whihc may
> interest other users.  If the data are perfect then  the residuals are
> amost zero and the estimate for the standard deviation is almost zero so
> you get a
>
>             0/0
>
> situation. very unlikely that this will occur with real data.
>
> If you are moving on to random effects you should first civilize the
> model a bit.  In somethng like
>
>    exp( a(1) + a(2)*v + a(3)*v^2 )
>
> you should at least center v as in
>
>          w = v -mean(v)
>
>          mfexp( a(1) + a(2)*w + a(3)*w^2 )
>
> The use of mfexp is to avoid overflow.
>
> also you might fit a(1) first as in
>
>       PARAMETER_SECTION
>
>           init_number a1                    // fit in phase 1
>           init_vector a(2,3,2)              .. fit in phase 2
>
>
>
>     mfexp( a1 + a(2)*w + a(3)*w^2 )
>
>
>
>
>
>
> Thanks guys. It runs well now with both methods you mentioned. I seems
> like it is not good to have perfect data! I gonna try the random effect
> module now...
>
> Cheers,
>
> Sylvain
>
> 2009/4/9 Mark Maunder <mmaunder at iattc.org>
>
>    I see that Dave found that it was related to having no error in the
> simulated data. I guess if you fixed the standard deviation (use a
> negative phase) it might work without adding error.
>
>
>
>    Mark
>
>
>
>    From: Sylvain Bonhommeau [mailto:sylvain.bonhommeau at gmail.com]
>    Sent: Thursday, April 09, 2009 8:39 AM
>    To: Mark Maunder
>     Subject: Re: [ADMB Users] "Hessian does not appear to be positive
> definite"
>
>
>
>    Hi Mark,
>
>    Thanks for your answer.
>    I simulated the data with R (code below). There is no error added to
> data for now but that is the aim of today. I specified a pin file and
> the initial conditions are not (but close to) the "known" parameters.
>
>    Thanks,
>
>    Sylvain
>
>
> --
> David A. Fournier
> P.O. Box 2040,
> Sidney, B.C. V8l 3S3
> Canada
> Phone/FAX 250-655-3364
> http://otter-rsch.com
> _______________________________________________
> 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/20090423/41173062/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kd_model_test.tpl
Type: application/octet-stream
Size: 1967 bytes
Desc: not available
URL: <http://lists.admb-project.org/pipermail/users/attachments/20090423/41173062/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kd_model_test.pin
Type: application/octet-stream
Size: 241 bytes
Desc: not available
URL: <http://lists.admb-project.org/pipermail/users/attachments/20090423/41173062/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kd_model_test_without_error.dat
Type: application/x-ns-proxy-autoconfig
Size: 1860086 bytes
Desc: not available
URL: <http://lists.admb-project.org/pipermail/users/attachments/20090423/41173062/attachment.dat>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kd_model_test_with_error.dat
Type: application/x-ns-proxy-autoconfig
Size: 1860615 bytes
Desc: not available
URL: <http://lists.admb-project.org/pipermail/users/attachments/20090423/41173062/attachment-0001.dat>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: data_generator.R
Type: application/octet-stream
Size: 1498 bytes
Desc: not available
URL: <http://lists.admb-project.org/pipermail/users/attachments/20090423/41173062/attachment-0002.obj>


More information about the Users mailing list