Skip to content
Prev 16897 / 20628 Next

Error in reS$ziReStruc[[i]]

Sorry, hit 'send' by accident.

 ~village would treat village as a fixed effect in the zero-inflation
model; ~1|village [or ~(1|village)] would treat it as a random effect.
I can't reproduce a problem with summary(); here's a reproducible
example.  Can you construct a reproducible example that fails ?

dd <- data.frame(village=factor(rep(1:6,50)))
set.seed(101)
zp <- c(0.2,0.8,0.3,0.5,0.6,0.7)
dd$z <- rbinom(300,size=1,prob=zp[dd$village])
dd$z[dd$z==1] <- rpois(sum(dd$z),lambda=3)
library(glmmTMB)
g1 <- glmmTMB(z~1,ziformula=~1|village,data=dd,
        family=poisson)
g2 <- update(g1,ziformula=~village)
summary(g1)
summary(g2)