print.geostan_fit | R Documentation |
Print a summary of model results to the R console, or plot posterior distributions of model parameters.
## S3 method for class 'geostan_fit'
print(x, probs = c(0.025, 0.2, 0.5, 0.8, 0.975), digits = 3, pars = NULL, ...)
## S3 method for class 'geostan_fit'
plot(x, pars, plotfun = "hist", fill = "steelblue4", ...)
x |
A fitted model object of class |
probs |
Argument passed to |
digits |
number of digits to print |
pars |
parameters to include; a character string (or vector) of parameter names. |
... |
additional arguments to |
plotfun |
Argument passed to |
fill |
fill color for histograms and density plots. |
The print methods writes text to the console to summarize model results. The plot method resturns a ggplot
(from rstan::plot
for stanfit objects).
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.