Just updated to the github version (2.11.5). Still not quite right.
library(tidyverse)
library(brms)
set.seed(1)
d <-
tibble(x = rnorm(200),
y = rnorm(200, 0.6 * x))
fit <-
brm(data = d,
y ~ 1 + x,
cores = 4,
seed = 1)
The fixed()
function appears to work.
fixef(fit)
Estimate Est.Error Q2.5 Q97.5
Intercept 0.04094791 0.07085068 -0.09793115 0.1790767
x 0.57683302 0.07737151 0.42293581 0.7279272
But we still get two intercepts for posterior_summary()
.
posterior_summary(fit)
Estimate Est.Error Q2.5 Q97.5
b_Intercept 0.04094791 0.07085068 -0.09793115 0.1790767
b_x 0.57683302 0.07737151 0.42293581 0.7279272
sigma 1.02001843 0.05127489 0.92435009 1.1259122
Intercept 0.06144835 0.07081172 -0.07706498 0.2000552
lp__ -292.76052962 1.19581758 -295.80919614 -291.3828067
Similar issue with posterior_samples()
.
posterior_samples(fit) %>%
glimpse()
Observations: 4,000
Variables: 5
$ b_Intercept <dbl> 0.092151574, 0.015175760, 0.052049185, -0.051800379, 0.08…
$ b_x <dbl> 0.5802608, 0.5863573, 0.4986585, 0.5511931, 0.6093724, 0.…
$ sigma <dbl> 0.9753384, 1.0698012, 1.0501172, 0.9832180, 1.0370508, 1.…
$ Intercept <dbl> 0.112773838, 0.036014691, 0.069771329, -0.032211171, 0.10…
$ lp__ <dbl> -291.8098, -291.9726, -292.0529, -292.4099, -291.6936, -2…