Hello,<br><br>I'm a new user to ADMB, but not to C++, R, and many other related languages.<br><br>I'm trying to fit a relatively simple fixed effects model with 10 parameters (Windows machine, GNU compiler). I have fit this model with a C++ program that I have written, and obtain reasonable results--I'm confident that the model is OK. For that matter, I'm confident that everything in my PROCEDURE section related to computing the negative log-likelihood is OK. I have also verified that parameters and data are obtained correctly. ADMB obtains the same function value for this model and these data that I have obtained with my own program.<br>
<br>The problem is this: When I translate/compile/run my program with ADMB ("makeadm filename -est"), no optimization takes place. The default output indicates that 0 iterations have occurred, and repeats my initial parameter estimates in the default table. I wonder if someone isn't willing to take a look and see if they can identify an issue that might be causing this?<br>
<br>My .tpl file is this:<br><br>DATA_SECTION<br> init_int ny<br> init_int na<br> init_int m<br> init_vector effdat(0,ny-1)<br> init_int teln<br> init_vector numtagged(0,teln-1)<br> init_vector numrecovered(0,teln-1)<br>
init_imatrix dat(0,ny-1,0,na-1)<br><br>PARAMETER_SECTION<br> init_vector parms(0,m-1)<br> objective_function_value totL<br><br>PROCEDURE_SECTION<br><br> int nyears=ny;<br> int nages=na;<br> int telnyears=teln;<br><br>
int fcohort[nyears][nages];<br> int pcohort[nages-1][nages];<br> int fdat[nyears+nages-1][nages];<br> double auxdat[nyears][nages];<br> int telyears[telnyears];<br> double auxyearsum[nyears], harvyearsum[nyears];<br>
int i, j;<br> int firsttime=0;<br><br> ....... log-likelihood calculations<br><br> totL=datL+auxL+telL; //yes, totL contains the negative log-likelihood at this point<br><br>My .pin file contains:<br><br># parms:<br>
520.0 443.0 534.0 356.0 291.0 270.0 106.0 0.75 0.0001 0.0001<br><br>My .dat file contains:<br><br>#nyears<br>5<br><br>#nages<br>3<br><br># parameters<br>10<br><br>#effort data<br>50 1216 1390 1673 440<br><br>#telnyears<br>
2<br><br>#numtagged<br>100 100<br><br>#numrecovered<br>4 12<br><br>#harvest data<br>2 1 1<br>40 33 14<br>37 27 22<br>41 13 9<br>4 8 2<br><br>And the resulting .par file contains:<br># Number of parameters = 10 Objective function value = -121.009 Maximum gradient component = 0.00000<br>
# parms:<br> 520.000 443.000 534.000 356.000 291.000 270.000 106.000 0.750000 0.000100000 0.000100000<br><br><br>Thanks in advance for your help,<br><br>Chris Gast<br>University of Washington<br>Quantitative Ecology and Resource Management<br>
<a href="mailto:cmgast@gmail.com">cmgast@gmail.com</a><br>