<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">

but anyway I think the sign is wrong. I think it should be </blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">

g = nroute*log_sigma_mu + 0.5*norm2(mu_r)/mfexp(2*log_sigma_mu); </blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">

g += nobs*log_sigma_y+0.5*norm2(y - Ey)/mfexp(2*log_sigma_y); </blockquote><br>Thanks, Dave!  How embarrassing, given the emphasis on "ADMB does minimization" throughout the docs.<br><br><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">

Also it is better to handle the std dev parameterization differently.</blockquote><div><br></div><div>Is it better to put std dev inside the norm like the following?</div><div>  0.5*norm2((y - Ey)/exp(log_sigma_y))</div>
<div>
<br></div><div>Thanks,</div><div>Ian</div>