I think there is a bit lost in translation here.
>I fixed the parameters and simulate Y to test the ADMB script. The
>retrieved
>parameters have exactly (and amazingly!) the same values as I fixed >(which
>is not the case when using optim function in R or fminsearch in matlab and
>it's much longer).
Do you mean the you used known parameters to simulate some data and then
fit the data and got the parameters back. Is that the same data set
for which the results you posted here are from? anyway if you send me
the tpl file and every thing needed to run the model I'll take a look at it.
Dave
--
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
Us...@admb-project.org
http://lists.admb-project.org/mailman/listinfo/users
Kd=column(Data,1);
random_number_generator rng(301);
dvector tmp(1,Nobs_tot);
Kd=elem_prod(Kd,exp(.01*tmp)); // add some lognormal noise to Kd
However with real data you may need to civilize the code a bit.
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 <mmau...@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.b...@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
I think we should keep this on the list as these are issures whihc may
What you are coming up against here are the limits of estimability.
If you remove the std dev from the model and just fit the least squares
and then
calculate the mean-squared residuals you will get 0.000821022 so the model
fits the data almost perfectly. the fact that they are not the values
you used
to generate the data simply reflects the fact that there is not a lot of
information in the data
i.e. thee are different combinations of the model parameters which fit
the model (almost) equally well.
Dave
> 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 <ot...@otter-rsch.com
> <mailto:ot...@otter-rsch.com>>
> 2009/4/9 Mark Maunder <mmau...@iattc.org <mailto:mmau...@iattc.org>>
> Us...@admb-project.org <mailto:Us...@admb-project.org>
> http://lists.admb-project.org/mailman/listinfo/users