when i use stan_glm(), i dont know how to change my interval.
my code:
mod_rstan <- stan_glm(
formula = f,
data = dat,
family = gaussian(),
prior_intercept = normal(0, 10),
prior = normal(0, 2.5),
prior_aux = cauchy(0, 5),
cores = 3,
chains = 3,
iter = 2000)
s_rstan <- summary(mod_rstan)
I get a result as the following picture showing: enter image description here
how can we change the interval from 10% to 2.5% and the another from 90% to 97.5%?
The estimation of the credible interval for the coefficients is performed in the
summary
call, not thestan_glm
call. You can adjust the width of the interval with the argumentprobs
,summary(example_model, probs = c(0.025, 0.975))
.