[R-sig-ME] error in glmmTMB when adding glmmTMBControl: unused arguments

Diego Pavon diego.pavonjordan at gmail.com
Tue Feb 13 11:43:51 CET 2018


Dear Mollie and Ben

After getting admin rights to my laptop, I managed to update glmmTMB from
0.1.0 to the latest 0.2.0 and the error message disappeared.

@Mollie, I will report to you if after running the model, the error message
I showed above still shows.

Cheers

Diego

On 12 February 2018 at 15:07, Mollie Brooks <mollieebrooks at gmail.com> wrote:

> Yes, I agree that the control argument (as you specified it) appears to be
> working on the development version of glmmTMB.
> For example
> (m3 <- glmmTMB(count~spp + mined + (1|site),
>   zi=~spp + mined,
>   family=nbinom2, Salamanders, control = glmmTMBControl(optCtrl =
> list(iter.max = 1000,
> eval.max = 1000), profile = TRUE, collect = FALSE)))
>
> The error you get
>
>
> Error in optimHess(par.fixed, obj$fn, obj$gr) :
>  gradient in optim evaluated to length 1 not 14
> In addition: There were 11 warnings (use warnings() to see them)
>
> should have produced a message including "See
> vignette('troubleshooting')". If it didn’t, then something is broken, so
> please report it in the issue tracker on GitHub or let me know.
>
> thanks,
> Mollie
>
> ———————————
> Mollie E. Brooks, Ph.D.
> Research Scientist
> National Institute of Aquatic Resources
> Technical University of Denmark
>
> On 12Feb 2018, at 13:48, Ben Bolker <bbolker at gmail.com> wrote:
>
> A reproducible example would be useful.  This works (with the
> development version
> of glmmTMB, but I'd be surprised if it broke since the last CRAN release
> ...)
>
> library(glmmTMB)
>
> m1 <- glmmTMB(count~ mined + (1|site),
>              zi=~mined,
>              family=poisson, data=Salamanders,
>  control=glmmTMBControl(optCtrl=list(iter.max=1e3,
>                                      eval.max=1e3),
>                         profile=TRUE))
>
> what's your sessionInfo()?
>
> Maybe obvious, but it would probably be efficient to do some
> troubleshooting/model-checking on a
> smaller subset of your data, if you haven't already ...
>
> On Mon, Feb 12, 2018 at 3:04 AM, Diego Pavon
> <diego.pavonjordan at gmail.com> wrote:
>
> Dear list
>
> I am trying to run this model
>
> M1.zi <- glmmTMB(Abundance ~ Temp_std + NEness_std + WithinNatura +
> Winter_std
>                 + WithinNatura * Winter_std + NEness_std * Winter_std +
> Temp_std * WithinNatura
>                 + WithinNatura * Winter_std  * NEness_std
>                 + (1|fWinter/site) + (1|species),
>                 family = poisson,
>                 ziformula = ~ 1,
>                 data = AllSpecies)
>
> but after a couple of days (I have 3.5 million data points), I finally got
> an error:
>
> Error in optimHess(par.fixed, obj$fn, obj$gr) :
>  gradient in optim evaluated to length 1 not 14
> In addition: There were 11 warnings (use warnings() to see them)
>
>
> Then I tried to add the CONTROL argument following
> https://cran.r-project.org/web/packages/glmmTMB/glmmTMB.pdf:
>
> M1.zi <- glmmTMB(Abundance ~ Temp_std + NEness_std + WithinNatura +
> Winter_std
>                 + WithinNatura * Winter_std + NEness_std * Winter_std +
> Temp_std * WithinNatura
>                 + WithinNatura * Winter_std  * NEness_std
>                 + (1|fWinter/site) + (1|species),
>                 family = poisson,
>                 control = glmmTMBControl(optCtrl = list(iter.max = 1000,
> eval.max = 1000), profile = TRUE, collect = FALSE),
>                 ziformula = ~ 1,
>                 data = AllSpecies)
>
>
> For some reason, I get this error message:
>
> Error in glmmTMB(Abundance ~ Temp_std + NEness_std + WithinNatura +
> Winter_std +  :
>  unused argument (control = glmmTMBControl(optCtrl = list(iter.max = 1000,
> eval.max = 1000), profile = TRUE, collect = FALSE))
>
>
> Does anyone have an idea how to specify the control arguments? I suspect
> this is some small thing I am missing but I can't see it anymore...
>
> Thank you very much for your time and help.
>
> Best
>
> Diego
>
>
>
> --
> *Diego Pavón Jordán*
>
> *Finnish Museum of Natural History*
> *PO BOX 17 *
>
> *Helsinki. Finland*
>
> *0445061210https://www.researchgate.net/profile/Diego_Pavon-jordan
> <https://www.researchgate.net/profile/Diego_Pavon-jordan>*
>
>        [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
>
>


-- 
*Diego Pavón Jordán*

*Finnish Museum of Natural History*
*PO BOX 17 *

*Helsinki. Finland*

*0445061210https://www.researchgate.net/profile/Diego_Pavon-jordan
<https://www.researchgate.net/profile/Diego_Pavon-jordan>*

	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list