Hi Paul Thank you for your answer. With your answer i would guess, that the problem might be that the response consist only out of 0 and 1. so the maximum number of trials is 1. But this is what brms is doing anyway, taking the maximum response as number of trials.
Does that mean that zero inflated binomial family is not possible with such a response or just difficult?
The model has this structure
priorx = c(set_prior("normal(0,1)", class = "lscale"),
set_prior("normal(0,1)", class = "sdgp"),
set_prior("normal(0,1)", class = "lscale", dpar="zi"),
set_prior("normal(0,1)", class = "sdgp", dpar="zi"),
set_prior("normal(0,1)", class = "b"),
set_prior("normal(0,1)", class = "b", coef = "var2", dpar="zi"),
set_prior("normal(0,1)", class = "b", coef = "var1"),
set_prior("normal(0,1)", class = "b", coef = "fac1"),
set_prior("normal(0,1)", class = "b", coef = "fac2"),
set_prior("normal(0,1)", class = "b", coef = "fac3"),
set_prior("normal(0,1)", class = "b", coef = "var2"))
fit=brm(bf(obs.yn ~ var1 + var2 + fac
+ gp(long, lat, gr=T)
+(1+var1 + var2|RE1)
+(1+var1 + var2 + fac|RE2)
, zi ~ var2
+ gp(long, lat, gr=T)
+(1+var2|RE1)
+(1+var2|RE2))
, data=xd, family=zero_inflated_binomial(), prior = priorx,
sample_prior = TRUE,warmup = 2000,iter = 5000, chains = 4,control = list(adapt_delta = 0.99, max_treedepth = 16))
Thank you!