open-AIMS / bayesnec

Bayesian No-Effect-Concentration estimation in R

Home Page:https://open-AIMS.github.io/bayesnec

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Poisson model produces error

beckyfisher opened this issue · comments

bug_dat.csv
When fitting using the attached data, and the following code:
dat <- read.csv("bug_dat.csv")
set.seed(333)
exp_2 <- bnec(y ~ crf(log_x, model = "ecx4param"), data = dat, iter=1e3)
bayesnec returns the error "Error in quantile.default(x, c(0.025, 0.975)) :
missing values and NaN's not allowed if 'na.rm' is FALSE". Note that debugging indicated this is occurring during expand_nec in the call to dispersion, because dispersion is returning only NA. While a terrible model fit, the brms model does fit successfully.