Book page 267 and web page https://avehtari.github.io/ROS-Examples/PoissonExample/poisson_regression.html in the negative binomial model for overdispersion section: ``` for (k in 1:K){ y_nb[[k]] <- rnegbin(n, exp(linpred), phi_grid[k]) fake_nb[[k]] <- data.frame(x=x, y=y_nb[[k]]) fit_nb[[k]] <- stan_glm(y ~ x, family=neg_binomial_2(link="log"), data=fake, refresh=0) } ``` I believe the ```data=fake``` should be ```data=fake_nb[[k]]```
Book page 267 and web page https://avehtari.github.io/ROS-Examples/PoissonExample/poisson_regression.html in the negative binomial model for overdispersion section:
I believe the
data=fakeshould be
data=fake_nb[[k]]