[ADMB Users] How to use the mcr command?
allan.hicks at noaa.gov
Tue Aug 7 17:40:57 PDT 2012
Hi Edgar and Jim,
Thanks for the simple example, Jim. I have never tried -mcr, but it is
nice to finally give it a test. I added to your example a little bit just
to verify in my mind that you do not need to re-run the minimization, but
can start directly at the MCMC. My appended model is:
f = square(a);
cout << "a=" << a << endl;
I then ran
program -mcmc 1000 -mcsave 100 -mcseed 3
I then ran:
program -mcmc 1000 -mcsave 100 -mcr -noest
A couple of things I learned are:
1) When using the -mcr option, you do not need to minimize again (use
-noest to save some time)
a) and you do not need to specify any starting values using -ainp or
-binp (because it starts from the previous chain)
2) When using -mcseed, the first value is not the MLE estimate (when not
using a seed the first sample is the estimate from minimization)
Thanks again for spurring me to investigate this further and answer some
questions that I had. Please correct me if any of my conclusions are wrong.
On Tue, Aug 7, 2012 at 5:17 PM, Jim Ianelli <jim.ianelli at noaa.gov> wrote:
> as a minimalist test I made the model:
> init_number a
> sdreport_number b
> objective_function_value f
> f = square(a);
> and invoked mcmc as:
> program -mcmc 1000 -mcsave 10
> and using readbin:
> readbin program.psv
> I found there was a chain of 100 elements.
> restarting as:
> program -mcr -mcmc 1000 -mcsave
> I got 200 elements in the chain...
> So it should work just to add -mcr with the previous arguments.
> 8 days to get 150000 MCMCs...wow.
> On Tue, Aug 7, 2012 at 4:58 PM, Edgar Gonzalez <edgarjgonzalez at ymail.com>wrote:
>> Hi everyone,
>> Does anyone know how the -mcr command works? I've searched the web and
>> couldn't find its use, apart from the vague:
>> -mcr resume previous mcmc
>> I ran my code (which is not a random effects model) as:
>> program -mcmc 500000 -mcsave -1500
>> which took about 8 days to run. My problem is that I can only run codes
>> for 10 days and then they're automatically stopped. So I'll have to
>> partition my mcmc run as I require 16 million steps (calculated from a
>> previous diagnostics run).
>> Could anyone help me?
>> Thanks in advance,
>> Edgar J. González
>> Ecology Department
>> Science Faculty, UNAM
>> Users mailing list
>> Users at admb-project.org
> James Ianelli
> REFM Division
> Alaska Fisheries Science Center
> NMFS/NOAA Building 4
> 7600 Sand Pt Way NE
> Seattle WA 98115
> 206 526 6510
> Users mailing list
> Users at admb-project.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Users