# b\_Intercept and Intercept: how are they related?

**URL:** <https://discourse.mc-stan.org/t/b-intercept-and-intercept-how-are-they-related/12933>\
**Category:** brms\
**Created:** [February 2, 2020, 7:49pm UTC](https://discourse.mc-stan.org/t/b-intercept-and-intercept-how-are-they-related/12933 "2020-02-02T19:49:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Solomon](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/solomon/32/2495_2.png) [@Solomon](https://discourse.mc-stan.org/u/Solomon)\
**Post date:** [February 2, 2020, 7:49pm UTC](https://discourse.mc-stan.org/t/b-intercept-and-intercept-how-are-they-related/12933/1 "2020-02-02T19:49:18Z")

</div>

Please also provide the following information in addition to your question:

- Operating System: macOS
- brms Version: 2.11.1

Following one of the recent **brms** updates (2.11.0, I believe), many functions (e.g., `fixef()`, `posterior_samples()`, `posterior_summary()`) now return information for both `b_Intercept` and `Intercept`. Sometimes these appear the same. Other times they appear different. What is their relationship? I looked around in the documentation and didn’t readily see an answer.

---

<div class="post-metadata">

**Author:** ![paul.buerkner](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/paul.buerkner/32/3303_2.png) [@paul.buerkner](https://discourse.mc-stan.org/u/paul.buerkner)\
**Post date:** [February 2, 2020, 7:51pm UTC](https://discourse.mc-stan.org/t/b-intercept-and-intercept-how-are-they-related/12933/2 "2020-02-02T19:51:42Z")

</div>

Intercept should should not be shown. I will take a look.

---

<div class="post-metadata">

**Author:** ![paul.buerkner](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/paul.buerkner/32/3303_2.png) [@paul.buerkner](https://discourse.mc-stan.org/u/paul.buerkner)\
**Post date:** [February 3, 2020, 7:52am UTC](https://discourse.mc-stan.org/t/b-intercept-and-intercept-how-are-they-related/12933/3 "2020-02-03T07:52:48Z")

</div>

I think I messed it up only in a recent github version of brms. Can you try it again with the latest github version. If it fails, can you provide a reproducible example?

---

<div class="post-metadata">

**Author:** ![Solomon](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/solomon/32/2495_2.png) [@Solomon](https://discourse.mc-stan.org/u/Solomon)\
**Post date:** [February 3, 2020, 3:05pm UTC](https://discourse.mc-stan.org/t/b-intercept-and-intercept-how-are-they-related/12933/4 "2020-02-03T15:05:00Z")

</div>

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…

```

---

<div class="post-metadata">

**Author:** ![paul.buerkner](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/paul.buerkner/32/3303_2.png) [@paul.buerkner](https://discourse.mc-stan.org/u/paul.buerkner)\
**Post date:** [February 3, 2020, 3:21pm UTC](https://discourse.mc-stan.org/t/b-intercept-and-intercept-how-are-they-related/12933/5 "2020-02-03T15:21:11Z")

</div>

Thanks, should be fixed now. FYI, “Intercept” refers to the centered intercept, that is, when all standard predictors (fixed effects) have mean zero. The centering happens internally inside Stan to speed up computation and has no user visible effects otherwise (except that Intercept was accidentally exported).

---

<div class="post-metadata">

**Author:** ![Solomon](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/solomon/32/2495_2.png) [@Solomon](https://discourse.mc-stan.org/u/Solomon)\
**Post date:** [February 3, 2020, 3:44pm UTC](https://discourse.mc-stan.org/t/b-intercept-and-intercept-how-are-they-related/12933/6 "2020-02-03T15:44:57Z")

</div>

Success! Thanks, @paul.buerkner.
