Skip to content

typo in book and on Examples web page #90

@brian-bucher

Description

@brian-bucher

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]]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions