[R-sig-ME] error in glmmTMB when adding glmmTMBControl: unused arguments
Ben Bolker
bbolker at gmail.com
Mon Feb 12 13:48:46 CET 2018
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
More information about the R-sig-mixed-models
mailing list