Error in loo and waic

Hello
i tried to fit a zero_inflated_binomial() model with a bernoulli response with brms.
It seems that it converged. But checking the waic or loo i got this error message
“Using the maximum response value as the number of trials.
Error in validate_ll(log_ratios) : All input values must be finite.”
Where does this error come from and is there any possibility to solve that?
Thank you very much for any hint!

Operating System: Windows 7; brms Version: 2.11.1

I don’t now what is causing the problem without a reproducible example, but I would recomment to manually specify the number of trials (see ?resp_trials) as the default option (maximum number of trials) is likely not what you want.

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!

I would say it does not make much sense since more zeros can be accounted for without the need for zero inflation for binary responses.

Ok! I was not sure about that. I was trying to fullfill a reviewers comment, asking for such a model.
If I got you right zero inflation is not appropriate, but is the bernoulli family enough, or would you suggest something else to account for the number of zeros?
Thank you very much!

I would think bernoulli should be enough.

Great! Thank you very much! And thank you also for your excellent and very helpful package! :)