- Operating System: Windows 10
- brms Version: 2.5.0
- R Version: 3.5.2
- RStudio Version: 1.2.5033
I am successfully fitting logistic regressions with a random effect - e.g.,
cop0 <- brm(g_samp ~ s_legg_add + (1 + s_legg_add|site), data = p_cop,
family = bernoulli(“logit”),
prior = c(set_prior(“normal(0,10)”, class = “b”, coef = “s_legg_add”)),
warmup = 1000, iter = 2000, chains = 4,
control = list(adapt_delta = 0.99, max_treedepth = 10), save_all_pars = TRUE )
But, as soon as I try to run a hurdle model - e.g.,
cop.o0 <- brm(bf(no_eggs ~ s_legg_add + (1 + s_legg_add|site) + offset(log(mass)),
hu ~ s_legg_add + s_lmass + (1 |site)),
data = p_cop, family = hurdle_negbinomial(),
prior = c(set_prior(“normal(0,10)”, class = “b”, coef = “s_legg_add”),
set_prior(“gamma(0.01,0.01)”, class = “shape”),
set_prior(“normal(0,10)”, class = “b”, coef = “s_legg_add”, dpar=“hu”),
set_prior(“normal(0,10)”, class = “b”, coef = “s_lmass”, dpar=“hu”)),
warmup = 1000, iter = 2000, chains = 4,
control = list(adapt_delta = 0.99, max_treedepth = 10), save_all_pars = TRUE)
I am hit with the following message:
Error: logml values need to be numeric
This is completely baffling given that these hurdle models were working earlier today. I have tried updating R and Stan and brms but I found that this actually lead to a series of other problems with compiling models, so I have gone back to the previous version of R that was working with Stan and brms. I have also started a new Rproject and moved everything in to it, but that has not solved the problem. Currently, I can get the first model to run without an issue, but the second model errors out immediately.