data(georgia)
A <- shape2mat(georgia, "B")
fit <- stan_glm(deaths.male ~ offset(log(pop.at.risk.male)),
C = A,
data = georgia,
family = poisson(),
chains = 1, iter = 600) # for speed only
s <- as.matrix(fit)
dim(s)
a <- as.matrix(fit, pars = "intercept")
dim(a)
# Or extract the stanfit object
S <- fit$stanfit
print(S, pars = "intercept")
samples <- as.matrix(S)
dim(samples)
Run the code above in your browser using DataLab