<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
    <title></title>
  </head>
  <body text="#000000" bgcolor="#ffffff">
    Hi <br>
    On page 75 there is an example of using mcmc.<br>
<a class="moz-txt-link-freetext" href="http://admb-project.org/community/admb-meeting-march-29-31/ADMBGettingStartedGuide.pdf">http://admb-project.org/community/admb-meeting-march-29-31/ADMBGettingStartedGuide.pdf</a><br>
    <br>
    In the admb editor I think you want to use \C-a to pass your program
    command line options. <br>
    However, that might just be admb-mode, I use Linux.  Here is a link
    to the admb-IDE manual.<br>
    I hope that it helps.<br>
    <br>
    <a class="moz-txt-link-freetext" href="http://admb-project.org/community/editing-tools/admb-ide/manual">http://admb-project.org/community/editing-tools/admb-ide/manual</a><br>
    <br>
    Aaron<br>
    <br>
    On 04/05/2011 08:38 AM, Luis Ridao wrote:
    <blockquote
      cite="mid:BANLkTi=Rmf1Ta=O2dHRjb1MN7+wx9Sz9+A@mail.gmail.com"
      type="cite">ADMB-help,
      <div><br>
      </div>
      <div>I wish to know how to run a model with MCMC on Windows.</div>
      <div><br>
      </div>
      <div>The ADMB editor I am using is Emacs (customised for Windows
        users -- courtesy of Arni Magnuson)</div>
      <div><br>
      </div>
      <div>The model is the well known Ricker S-R with an extra
        covariate:</div>
      <div>###########</div>
      <div>GLOBALS_SECTION</div>
      <div>
        <div>  #include "admodel.h"</div>
        <div>  const double pi = 3.141592654;</div>
        <div>  ofstream mcmc_par("ricker2massb_mcmc.csv")</div>
        <div><br>
        </div>
        <div>DATA_SECTION</div>
        <div>  init_int n</div>
        <div>  init_matrix data(1,n,1,3)</div>
        <div>  vector S(1,n)</div>
        <div>  !! S = column(data,1);</div>
        <div>  vector R(1,n)</div>
        <div>  !! R = column(data,2);</div>
        <div>  vector massb(1,n)</div>
        <div>  !! massb = column(data,3);</div>
        <div>  </div>
        <div>PARAMETER_SECTION</div>
        <div>  init_number a</div>
        <div>  init_number b</div>
        <div>  init_number c</div>
        <div>  init_number logSigma</div>
        <div>  sdreport_number sigma</div>
        <div>  vector Rfit(1,n)</div>
        <div>  number RSS</div>
        <div>  objective_function_value f</div>
        <div><br>
        </div>
        <div>INITIALIZATION_SECTION</div>
        <div>  a 0.6</div>
        <div>  b -4.0</div>
        <div>  c -1.1</div>
        <div>  logSigma -1</div>
        <div>  </div>
        <div>PROCEDURE_SECTION</div>
        <div>  Rfit = exp(a) * elem_prod(S,
          exp(-exp(b)*S+exp(c)*massb));</div>
        <div>  RSS = sum(square(log(R)-log(Rfit)));</div>
        <div>  sigma = exp(logSigma);</div>
        <div>
            f = 0.5*n*log(2*pi) + n*logSigma + RSS/(2.0*square(sigma));</div>
        <div>  if(mceval_phase())</div>
        <div>  write_mcmc();</div>
        <div><br>
        </div>
        <div>FUNCTION write_mcmc</div>
        <div>  mcmc_par << a << "," << b << ","
          << c << endl;</div>
      </div>
      <div>###################</div>
      <div><br>
      </div>
      <div>Thanks in advance,</div>
      <div>Luis</div>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@admb-project.org">Users@admb-project.org</a>
<a class="moz-txt-link-freetext" href="http://lists.admb-project.org/mailman/listinfo/users">http://lists.admb-project.org/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>