# \donttest{
data(georgia)
C <- shape2mat(georgia, "B")
fit <- stan_esf(deaths.male ~ offset(log(pop.at.risk.male)),
C = C,
re = ~ GEOID,
data = georgia,
family = poisson(),
chains = 1, iter = 600) # for speed only
# Residuals
r <- resid(fit)
head(r)
moran_plot(r$mean, C)
# Fitted values
f <- fitted(fit)
head(f)
f2 <- fitted(fit, rates = FALSE)
head(f2)
# Spatial trend
esf <- spatial(fit)
head(esf)
# }
Run the code above in your browser using DataLab