In a simple glm with one predictor it seems as if rstanarm is using different default priors compared to brms.
Now for the rstanarm package the default priors (and adustment) are clear to me, but does anyone know what brms does in order to set priors scale and location?
The model code for rstanarm:
p_1_ec_g_brm_rstan <- stan_glm(ec ~ g, data = p_1_36ec, chains = 4, iter = 10000, warmup = 1000)
The model code for the brms:
p_1_ec_g_brm_n <- brm(ec ~ g, data = p_1_36ec, chains = 4, iter = 10000, warmup = 1000)
After modelling the following priors are used:
Priors for model 'p_1_ec_g_brm_rstan'
------
Intercept (after predictors centered)
Specified prior:
~ normal(location = 53, scale = 2.5)
Adjusted prior:
~ normal(location = 53, scale = 16)
Coefficients
Specified prior:
~ normal(location = 0, scale = 2.5)
Adjusted prior:
~ normal(location = 0, scale = 40)
Auxiliary (sigma)
Specified prior:
~ exponential(rate = 1)
Adjusted prior:
~ exponential(rate = 0.16)
------
While the brms shows the following in the summary:
Family: gaussian
Links: mu = identity; sigma = identity
Formula: ec ~ g
Data: p_1_36ec (Number of observations: 1057)
Samples: 4 chains, each with iter = 10000; warmup = 1000; thin = 1;
total post-warmup samples = 36000
Priors:
Intercept ~ student_t(3, 55, 7.4)
sigma ~ student_t(3, 0, 7.4)
Population-Level Effects:
Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
Intercept 51.10 0.43 50.25 51.96 1.00 39083 27776
gv 2.72 0.48 1.77 3.67 1.00 39362 27428
Family Specific Parameters:
Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
sigma 6.18 0.14 5.92 6.46 1.00 40910 27733
- Operating System: mac os 11.3
- rstanarm Version: 2.21.2
- brms Version 2.15.0