<br>Thanks for the helping hand<div><br></div><div>Best,</div><div>Luis<br><div><br></div><div><br><div class="gmail_quote">On Tue, Apr 5, 2011 at 4:51 PM, aaron <span dir="ltr"><<a href="mailto:jaguar.smart@gmail.com">jaguar.smart@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

  
    
    
  
  <div text="#000000" bgcolor="#ffffff">
    Hi <br>
    On page 75 there is an example of using mcmc.<br>
<a href="http://admb-project.org/community/admb-meeting-march-29-31/ADMBGettingStartedGuide.pdf" target="_blank">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 href="http://admb-project.org/community/editing-tools/admb-ide/manual" target="_blank">http://admb-project.org/community/editing-tools/admb-ide/manual</a><br>
    <br>
    Aaron<div><div></div><div class="h5"><br>
    <br>
    On 04/05/2011 08:38 AM, Luis Ridao wrote:
    </div></div><blockquote type="cite"><div><div></div><div class="h5">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>
      </div></div><pre><fieldset></fieldset>
_______________________________________________
Users mailing list
<div class="im"><a href="mailto:Users@admb-project.org" target="_blank">Users@admb-project.org</a>
<a href="http://lists.admb-project.org/mailman/listinfo/users" target="_blank">http://lists.admb-project.org/mailman/listinfo/users</a>
</div></pre>
    </blockquote>
    <br>
  </div>

<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@admb-project.org">Users@admb-project.org</a><br>
<a href="http://lists.admb-project.org/mailman/listinfo/users" target="_blank">http://lists.admb-project.org/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div></div>