[ADMB Users] glmmADMB-Function maximizer failed Poisson, ZIPoisson, NB1, ZINB1

Rocio Jana rcjp14 at gmail.com
Mon Dec 19 11:32:50 PST 2011


Hello Ben
The e-mail I sent yesterday was blocked because of the size of the
attached file dat. I'll email you directly the pin and dat files (I
sent you yesterday thedata and R code). Please see text below.
Thanks
Rocio



 Now I understood what you were saying (I think), thanks. This time I
copied the cmd.exe file to the temporary folder, and run the command.

"C:/Program Files/R/R-2.14.0/library/glmmADMB/bin/wi
ndows32/glmmadmb.exe" -maxfn 500 -noinit


 from the terminal window.

Output follows:

Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

C:\Users\Rocio\Dropbox\Thesis PhD\Results\Pelorus data\in process\R Pelorus\DK\a
nalysis DK\glmmADMB\glmmtmp>"C:/Program Files/R/R-2.14.0/library/glmmADMB/bin/wi
ndows32/glmmadmb.exe" -maxfn 500 -noinit

Initial statistics: 7 variables; iteration 0; function evaluation 0; phase 1
Function value   9.8743298e+02; maximum gradient component mag  -6.2270e+00
Var   Value    Gradient   |Var   Value    Gradient   |Var   Value    Gradient

 1  0.00000  1.07650e+00 |  2  0.00000  2.02307e+00 |  3  0.00000 -2.28066e-01
 4  0.00000 -6.22700e+00 |  5  0.00000  4.40416e-01 |  6  0.00000  2.35466e+00
 7  0.00000 -3.73239e-01 |

Intermediate statistics: 7 variables; iteration 10; function evaluation 13; phas
e 1
Function value   9.3661483e+02; maximum gradient component mag  -1.3118e-01
Var   Value    Gradient   |Var   Value    Gradient   |Var   Value    Gradient

 1 -7.16587  9.77975e-02 |  2 -5.89626 -1.18792e-01 |  3  1.65312 -3.34196e-02
 4 12.23006 -3.94453e-02 |  5  0.79002 -4.71586e-03 |  6-19.23210  4.09933e-03
 7 -2.39234 -1.31184e-01 |
7 variables; iteration 20; function evaluation 23; phase 1
Function value   9.3630673e+02; maximum gradient component mag   1.1224e-04
Var   Value    Gradient   |Var   Value    Gradient   |Var   Value    Gradient

 1 -9.56385  1.12240e-04 |  2 -4.20424 -1.73660e-05 |  3  2.54873 -5.19771e-05
 4 13.79312 -3.84108e-05 |  5  2.29122  3.12230e-05 |  6-27.30826 -1.53161e-05
 7 -1.68819 -8.21997e-05 |

 - final statistics:
7 variables; iteration 21; function evaluation 24
Function value   9.3631e+02; maximum gradient component mag   2.4472e-05
Exit code = 1;  converg criter   1.0000e-04
Var   Value    Gradient   |Var   Value    Gradient   |Var   Value    Gradient

 1 -9.56580 -2.71265e-06 |  2 -4.20375 -2.00960e-06 |  3  2.54936 -1.24119e-05
 4 13.79420 -2.47582e-06 |  5  2.29220  2.44725e-05 |  6-27.31371  5.52717e-06
 7 -1.68800  6.91965e-06 |

Initial statistics: 8 variables; iteration 0; function evaluation 0; phase 2
Function value   2.5317989e+03; maximum gradient component mag  -1.5770e+04
Var   Value    Gradient   |Var   Value    Gradient   |Var   Value    Gradient

 1 -9.56580 -3.34574e+00 |  2 -4.20375  5.64782e-01 |  3  2.54936  4.67688e-01
 4 13.79420 -1.97624e+00 |  5  2.29220  2.09047e-01 |  6-27.31371 -2.51638e-01
 7 -1.68800  6.99966e-02 |  8  0.05795 -1.57700e+04 |

Intermediate statistics: 8 variables; iteration 10; function evaluation 14; phas
e 2
Function value   1.2108985e+03; maximum gradient component mag  -2.3990e+01
Var   Value    Gradient   |Var   Value    Gradient   |Var   Value    Gradient

 1 48.11251  4.36815e-01 |  2 -1.70464  1.01715e-01 |  3  0.08195  3.06426e-02
 4  5.08995  1.61697e-01 |  5  0.63700  9.17857e-02 |  6 -9.14759 -4.76702e-01
 7 -0.52802 -1.14350e-02 |  8  0.49487 -2.39897e+01 |
8 variables; iteration 20; function evaluation 24; phase 2
Function value   1.2094768e+03; maximum gradient component mag  -1.3742e-01
Var   Value    Gradient   |Var   Value    Gradient   |Var   Value    Gradient

 1 45.45399  2.05442e-03 |  2 -2.40041 -7.84976e-04 |  3 -0.23354  2.10991e-03
 4  4.46732 -4.20901e-03 |  5 -0.03951  5.50287e-04 |  6 -5.52707 -9.91974e-04
 7 -0.41976 -3.00801e-03 |  8  0.47819 -1.37424e-01 |

 - final statistics:
8 variables; iteration 28; function evaluation 32
Function value   1.2095e+03; maximum gradient component mag  -3.6290e-05
Exit code = 1;  converg criter   1.0000e-04
Var   Value    Gradient   |Var   Value    Gradient   |Var   Value    Gradient

 1 45.43909  3.33461e-07 |  2 -2.39643 -8.71364e-07 |  3 -0.24019  1.08903e-06
 4  4.47829 -8.06363e-07 |  5 -0.04157 -1.52222e-06 |  6 -5.52336 -5.95947e-07
 7 -0.40882  1.30698e-06 |  8  0.47812 -3.62897e-05 |
Hessian type 4
 inner maxg = -0.0006781  Inner second time = -0.0006781  Inner f = 1191
 f = 1190.630581903202 max g = 0.0006781269614516524
Newton raphson 1
C:\Users\Rocio\Dropbox\Thesis PhD\Results\Pelorus data\in process\R Pelorus\DK\a
nalysis DK\glmmADMB\glmmtmp>


I hope it helps.
I'll email you the data and R code now.

Thanks again
Rocio




2011/12/19 Ben Bolker <bbolker at gmail.com>:
> On 11-12-18 05:36 PM, Rocio Jana wrote:
>> Hello Ben
>>
>> Thanks for the instructions. I did my homework, and tried to follow
>> the instructions you sent. So far:
>> 1- latest version downloaded today, reinstalled
>>
>> 2- new code run
>>
>> pel.mataicl.NBalt<-glmmadmb(mataicl ~ rimuover + kahikover + mataiover
>> + miroover + hinauover + tawaover+(year|trapno),
>> zeroInflation=FALSE,data=pel.3.dat,family =
>> "nbinom1",admb.opts=admbControl(run=FALSE),debug=TRUE,save.dir="glmmtmp")
>>
>> Temporary folder created in working directory.
>
>   OK.
>>
>> 3- I am not sure what you meant with "copy the glmmadmb binary over to
>> that directory (if necessary -- this only happens on MacOS and Linux,
>> not on Windows)" as the exe file didn't appear in the temporary
>> folder, it was only in the new installed version of the package in the
>> library.
>
>   Yes.  The point is that, on Windows, you *don't* have to copy the
> executable to the temporary directory.
>
>>
>> So I copied the glmmadmb.exe file from the downloaded binary file into
>> the glmmtmp folder. And I ran it. CMD window opened and analysis ran.
>> Several files were created (can send you the list if you want me to),
>> including glmmadmb.dat and glmmadmb.pin files.
>
>  If you send the .dat and .pin files to the list, that will help.
>
>> I don't find any obvious output telling me what command would be run
>> by glmmADMB to run the model, sorry. Should it be one of the newly
>> created files in the glmmtmp folder?
>
>  I believe the 'debug' output should have told you (can you post the
> output of running the command?), but it will be something like the
> "C:\WINDOWS\ ..." command below.
>>
>> 4- Step 2
>>
>> I couldn't make it work. I am sorry, but I don't understand very well
>> the instructions in this step.
>>
>>> change to the temporary directory and run the command (which in your
>>> case would be
>>
>>> C:\WINDOWS\system32\cmd.exe /c "C:/Program
>>> Files/R/R-2.14.0/library/glmmADMB/bin/windows32/glmmadmb.exe" -maxfn 500
>>> -noinit
>>
>> When you said "change to the temporary directory" you mean change the
>> working directory within R (File, change dir...)?
>> and "run the command" in R?
>> because I tried it, but R didn't recognize it.
>
>  No, I mean in the terminal window, change to the temporary directory
> that was created within your working directory, then run
> the command above in the terminal window.
>>
>> And finally, even I haven't got to step 3, once I do it, should I
>> re-run the whole code from step 1? i.e. re-create the temp folder and
>> everything? or re-run the code without the extra bit? Will R find the
>> output files even they were created in this temporary folder? As I
>> need to run 5 other models with other response variables and same
>> predictors, will it work automatically or will I need to run the code
>> from outside of R before every new model?
>
>  Well, right now we're just trying to figure out what's wrong. If we
> can debug this then you won't need to run the code outside of R.
>
>  The basic idea of what I am trying to get you to do here is:
>
> 1. Run glmmADMB with run=FALSE to generate the files necessary to run
> the model, and copy them to the temporary working directory
>
> 2. Run the binary outside of R.
>
> 3. Run glmmADMB with run=FALSE again, this time to read in the *output*
> files generated in step 2.
>
>  This is more steps than running everything from within R, but it may
> help debug/expose whether there are problems when running from within R.
>
>  Are you willing to send me the original data set and the
> self-contained code that reads in the data and leads up to running the
> glmmADMB model?
>
>> I apologize if I am asking too much, but I find this package extremely
>> useful and complete. So I really want to be able to use it well (and I
>> also need to).
>>
>> Thank you very much
>> Rocio
>>
>>
>>
>>> Rocio C. Jaña Prado PhD candidate
>>> School of Biological Sciences
>>> University of Canterbury Te Whare Wananga o Waitaha
>>>  Private Bag 4800, Christchurch 8020
>>>  New Zealand
>>> Phone: +64 3 3643055 or ext 3055 Fax: +64 3 3642590
>> _______________________________________________
>> Users mailing list
>> Users at admb-project.org
>> http://lists.admb-project.org/mailman/listinfo/users
>



--
Rocio C. Jaña Prado


*** a este mensaje se le han eliminado los acentos


-- 
Rocio C. Jaña Prado


*** a este mensaje se le han eliminado los acentos



More information about the Users mailing list