glmmADMB errors
Thanks Mollie, In fact, I am following instructions from the Zuur's book Beginner's guide to zero inflated models and he suggests something similar to what you have proposed. Hurdle models: First modelling with a binomial distribution when biomass is present or not and second, once is present with Gamma see which variables are affecting the present biomass, plus glueing both models together in a ZAG. However I am having some further problems since one of my varibles is random and nested, which I think the model doesn't like that much, although it allows to use glmer in such cases. However, using glmmADMB with the gamma family still returns errors:
Model_ADMB_G<-glmmadmb(Biomass~Protection*Exposure+(1|Protection/Location),data=GLMMADMB_P,
family="gamma") Error in glmmadmb(Biomass ~ Protection + Exposure + Protection:Exposure + : The function maximizer failed (couldn't find parameter file) Troubleshooting steps include (1) run with 'save.dir' set and inspect output files; (2) change run parameters: see '?admbControl';(3) re-run with debug=TRUE for more information on failure mode Adem?s: Warning message: comando ejecutado 'C:\WINDOWS\system32\cmd.exe /c glmmadmb -maxfn 500 -maxph 5 -noinit -shess' tiene estatus 1 I hope someone can see what I am doing wrong. Thanks in advance
On 20 October 2017 at 13:51, Mollie Brooks <mollieebrooks at gmail.com> wrote:
Hi Andreu, A zero-inflated Poisson distribution is not appropriate because biomass is not count data. I would recommend checking what distribution other researchers in your field are using. Maybe you want to first model zero vs non-zero and then model the non-zero biomasses separately. The log of non-zero biomasses could be modeled with a normal distribution. Or on the natural scale, they could be Gamma or Tweedie. Or maybe a zero-inflated continuous positive distribution (e.g. Gamma or Tweedie) makes sense for all of the biomasses. These zero-inflated models could be fit in glmmTMB. cheers, Mollie On Thu, Oct 19, 2017 at 2:03 PM, andreu blanco <andreu.blanco at gmail.com> wrote:
Dear list members, I am starting with generalized mixed models and I am having some trouble I hope someone could help me with. We are trying to understand the invasiveness of algae inside and outside MPA, to do so our sampling was set with a nested desing: Protected vs nonProtected 4 Locations (protected) vs 4 Locations (nonProtected) Exposed vs Semiexposed at each location 1 transect per sampling point (total 16) 5 quadrants per transect str(dataGLMMADMB) 'data.frame': 80 obs. of 4 variables: $ Location: Factor w/ 4 levels "Cies1","Cies2",..: 1 1 1 1 1 1 1 1 1 1 ... $ Protection: Factor w/ 2 levels "Control","Protected": 1 1 1 1 1 2 2 2 2 2 ... $ Exposure: Factor w/ 2 levels "Exposed","Semiexposed": 1 1 1 1 1 1 1 1 1 1 ... $ Biomass: num 124.8 104.8 139.2 102.6 62.9 ... First I ran it as a Poission distribution (after round the Biomass values) to be able to fit a zeroInflation model:
Model_ADMB_P<-glmmadmb(Biomass~Protection+Exposure+Protectio
n:Exposure+(1| Protection/Location),data=GLMMADMB_P, zeroInflation=TRUE, family="Poisson") Parameters were estimated, but standard errors were not: the most likely problem is that the curvature at MLE was zero or negative Error in glmmadmb(Biomass ~ Protection + Exposure + Protection:Exposure + : The function maximizer failed (couldn't find parameter file) Troubleshooting steps include (1) run with 'save.dir' set and inspect output files; (2) change run parameters: see '?admbControl';(3) re-run with debug=TRUE for more information on failure mode Adem?s: Warning message: comando ejecutado 'C:\WINDOWS\system32\cmd.exe /c glmmadmb -maxfn 500 -maxph 5 -noinit -shess' tiene estatus 1 Then I though that since my data is continuous I'd better run the model with a gamma family, however, when I do run it with gamma I got the following error:
Model_ADMB_G<-glmmadmb(Biomass~Protection+Exposure+Protectio
n:Exposure+(1| Protection/Location),data=GLMMADMB_P, family="gamma") Error in glmmadmb(Biomass ~ Protection + Exposure + Protection:Exposure + : The function maximizer failed (couldn't find parameter file) Troubleshooting steps include (1) run with 'save.dir' set and inspect output files; (2) change run parameters: see '?admbControl';(3) re-run with debug=TRUE for more information on failure mode Adem?s: Warning message: comando ejecutado 'C:\WINDOWS\system32\cmd.exe /c glmmadmb -maxfn 500 -maxph 5 -noinit -shess' tiene estatus 1 However, when I run it as a Poisson distribution with zeroInflated values but with no nested design and Location effect either, it ran ok
Model_ADMB_P1<-glmmadmb(Biomass~Protection*Exposure,data=GLMMADMB_P,
zeroInflation=TRUE, family="Poisson")
summary(Model_ADMB_P1)
Call:
glmmadmb(formula = Biomass ~ Protection * Exposure, data = GLMMADMB_P,
family = "Poisson", zeroInflation = TRUE)
AIC: 1570.7
Coefficients:
Estimate Std. Error z value
Pr(>|z|)
(Intercept) 4.71e+00 3.18e-02 148.0
<2e-16
ProtectionProtected -5.53e-01 5.00e-02 -11.1
<2e-16
ExposureSemiexposed -3.83e+01 2.22e+05 0.0
1
ProtectionProtected:ExposureSemiexposed 3.64e+01 2.22e+05 0.0
1
(Intercept) ***
ProtectionProtected ***
ExposureSemiexposed
ProtectionProtected:ExposureSemiexposed
---
Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1
Number of observations: total=80
Zero-inflation: 0.30908 (std. err.: 0.071433 )
Log-likelihood: -780.37
I can not understat the solutions to these errors, can anyone please help
me out?
I really appreciate it!
Thanks in advance,
--
Andreu Blanco Cartagena
Si no ?s imprescindible, no imprimeixis aquest e-mail. Estalviar paper
ajuda a protegir el medi ambient.
Si no es imprescindible, no imprimas este e-mail. Ahorrar papel ayuda a
proteger el medio ambiente.
[[alternative HTML version deleted]]
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
Andreu Blanco Cartagena Si no ?s imprescindible, no imprimeixis aquest e-mail. Estalviar paper ajuda a protegir el medi ambient. Si no es imprescindible, no imprimas este e-mail. Ahorrar papel ayuda a proteger el medio ambiente. [[alternative HTML version deleted]]