data(georgia)
georgia$income <- georgia$income/1e3
fit <- stan_glm(deaths.male ~ offset(log(pop.at.risk.male)) + log(income),
centerx = TRUE,
data = georgia,
family = poisson(),
chains = 2, iter = 600) # for speed only
# print and plot results
print(fit)
plot(fit)
Run the code above in your browser using DataLab