# Intercept not converging in brms multilevel models with intensive longitudinal data

**URL:** <https://discourse.mc-stan.org/t/intercept-not-converging-in-brms-multilevel-models-with-intensive-longitudinal-data/39896>\
**Category:** Modeling\
**Tags:** brms, fitting-issues\
**Created:** [July 16, 2025, 3:56am UTC](https://discourse.mc-stan.org/t/intercept-not-converging-in-brms-multilevel-models-with-intensive-longitudinal-data/39896 "2025-07-16T03:56:33Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![RachFree](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@RachFree](https://discourse.mc-stan.org/u/RachFree)\
**Post date:** [July 16, 2025, 3:56am UTC](https://discourse.mc-stan.org/t/intercept-not-converging-in-brms-multilevel-models-with-intensive-longitudinal-data/39896/1 "2025-07-16T03:56:33Z")

</div>

Hi all,  
I’m reasonably new to brms and the bayesian approach, but have recently taken a deep-ish dive and I am currently running brms models for an intensive longitudinal study that surveyed participants (n = 179) 9 times a day for 21 days, 35691 observations total (compliance 82.8%). This means observations are nested within people. I’m looking at how some emotion regulation strategies predict other strategies, and how they interact to predict negative emotion experience. For legal reasons I can’t share the data, sorry. However, I can tell you these are multilevel models, performed using brms with the generic lmer syntax:

strategy1 ~ 1 + strategy2\_centred + (1 + strategy2\_centred | ID)  
or  
emotion ~ 1 + strategy1\_centred \* strategy2\_centred + lagged\_emotion + (1 + strategy1\_centred \* strategy2\_centred + lagged\_emotion | ID)

All predictors and outcomes are level 1 or ‘within person’ predictors, thus they can be included as random slopes grouped by participant (ID).

**The issue is that no matter what I do, the intercepts struggle to converge.** Chains are poorly mixed, Bulk ESS is low (\<400). It doesn’t seem to matter whether I use a flat, weakly regularising or strongly regularising priors on the intercept. I’ve upped iterations. I’ve reduced model complexity. I’ve excluded participants with less than 10 observations. Even when I run an intercepts only model, the same thing happens.  
I’ve been running bernoulli, gaussian, ZIB, and hurdle lognormal models with the same kind of data and I’m coming up with the same issue. The intercepts struggle to converge. I’m wondering whether the random intercepts in these models account for so much variance that there is little fixed intercept variance left for the sampler to explore?

**Does anyone have any thoughts on this or have experienced this before?** I am grateful for your help/advice!

---

<div class="post-metadata">

**Author:** ![amynang](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/amynang/32/19114_2.png) [@amynang](https://discourse.mc-stan.org/u/amynang)\
**Post date:** [July 16, 2025, 8:27am UTC](https://discourse.mc-stan.org/t/intercept-not-converging-in-brms-multilevel-models-with-intensive-longitudinal-data/39896/2 "2025-07-16T08:27:37Z")

</div>

> [@RachFree](#):
>
> I’ve reduced model complexity.

Perhaps you have already tried this but fwiw, one thing that helps me troubleshoot in situations like this, is to also work with _a subset of the data for which the simple model is adequate_ and then ratchet up. If you select only one participant (a compliant one, I guess) and one day, does the problem persist? If not, do you get in trouble with one participant and all days? And so on.

---

<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:** [July 16, 2025, 2:48pm UTC](https://discourse.mc-stan.org/t/intercept-not-converging-in-brms-multilevel-models-with-intensive-longitudinal-data/39896/3 "2025-07-16T14:48:41Z")

</div>

Tell us more about your response variables, `strategy1` and `emotion`. Specifically, how they are measured (e.g., Likert-type items or scales?) and how they are currently scaled (e.g., raw metric, standardized).

---

<div class="post-metadata">

**Author:** ![RachFree](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@RachFree](https://discourse.mc-stan.org/u/RachFree)\
**Post date:** [July 17, 2025, 4:14am UTC](https://discourse.mc-stan.org/t/intercept-not-converging-in-brms-multilevel-models-with-intensive-longitudinal-data/39896/5 "2025-07-17T04:14:46Z")

</div>

Hey Solomon,

They are measured on a slider scale 0 to 100, I’ve scaled them down to between 0 and 1 for analysis (dividing by 100) and person mean centred them. I’ve also tried to run the models on the original scale (still centred). For Bernoulli models the strategy outcome is a binarised (0 is 0-10 points, 1 is 10 to 100). For ZIB models, the outcome is scaled to between 0 and 1 with actual 1s (100 on the original scale) replaced with .99.

---

<div class="post-metadata">

**Author:** ![RachFree](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@RachFree](https://discourse.mc-stan.org/u/RachFree)\
**Post date:** [July 17, 2025, 4:58am UTC](https://discourse.mc-stan.org/t/intercept-not-converging-in-brms-multilevel-models-with-intensive-longitudinal-data/39896/6 "2025-07-17T04:58:39Z")

</div>

As a follow up, and following @amynang’s query about reducing complexity, I ran a fixed intercept only ZIB model (no random intercepts) with negative emotion as the outcome and the intercept converged very well (Rhat = 1, Bulk ESS = 5937). It still ran well and converged when I added a fixed intercept for the zi part of the model (Rhat = 1, Bulk ESS = 5937). However, when I added random intercepts to the ZIB model the fixed intercept went haywire: Rhat = 1.11, Bulk ESS = 28 (full disclosure I reduced the iterations in this model to 4000 post warm up draws to reduce computation time). I can’t just leave random intercepts out of the model for theoretical (and pre-registered) reasons. So what is going on here?

---

<div class="post-metadata">

**Author:** ![amynang](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/amynang/32/19114_2.png) [@amynang](https://discourse.mc-stan.org/u/amynang)\
**Post date:** [July 17, 2025, 8:05am UTC](https://discourse.mc-stan.org/t/intercept-not-converging-in-brms-multilevel-models-with-intensive-longitudinal-data/39896/7 "2025-07-17T08:05:26Z")

</div>

I once struggled with a zero-one-inflated Beta model that just wouldn’t sample and when I switched to [ordbetareg](https://cran.r-project.org/web/packages/ordbetareg/vignettes/package_introduction.html) (and related [paper](https://osf.io/preprints/socarxiv/2sx6y_v1)) it just breezed through. Worth a try. Since the package is essentially a brms extension, you will be in familiar territory.

In principle, you could treat your data as [ordinal](https://journals.sagepub.com/doi/full/10.1177/2515245918823199) but I do not know if a model with 100 intercepts to estimate is workable with your data.

---

<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:** [July 17, 2025, 6:54pm UTC](https://discourse.mc-stan.org/t/intercept-not-converging-in-brms-multilevel-models-with-intensive-longitudinal-data/39896/8 "2025-07-17T18:54:17Z")

</div>

Thanks for the info about your data @RachFree. A few comments:

- While you’re in the de-bugging phase, consider reducing your data set. The models will fit faster, sometimes much faster. Perhaps do something like taking a random subset of like 20% of your participants. I often do things like this when I’m in your shoes, and I never would have considered it before I started using Bayesian software like brms.
- To be clear, when you say you have “person mean centered them,” are you still talking about the DVs? I’m familiar with person mean centering for _predictor_ variables in multilevel models, but I find it surprising you’d do so for a _DV_. Could you share your thoughts on person mean centering the DVs?
- If you are first re-scaling your data (e.g., to a 0-to-1 metric) and then person mean centering afterward, I would imagine that would result in changing the lower and upper bounds. If you really want this, you might be stuck with either Gaussian or Student-t likelihoods.
- Have you tried setting `inits = 0`? This can become a crutch, and I don’t recommend you lean on it. But it can be a helpful trick while de-bugging. Along those lines, consider setting `init_r = 0.2` instead.
- For ZIB variants of the model (which I would imagine would only be possible if you didn’t person mean center the DV, otherwise you’d be at risk of violating the lower and/or upper boundaries), there’s no need to replace the 1s with 0.99. brms offers the zero-and-one inflated beta distribution by `family = zero_one_inflated_beta`. I’ve had slider-scale in the past, and this was the method I used.

---

<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:** [July 17, 2025, 6:56pm UTC](https://discourse.mc-stan.org/t/intercept-not-converging-in-brms-multilevel-models-with-intensive-longitudinal-data/39896/9 "2025-07-17T18:56:48Z")

</div>

Also, it looks like this is your first post. Welcome to the Stan forums, @RachFree!

---

<div class="post-metadata">

**Author:** ![RachFree](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@RachFree](https://discourse.mc-stan.org/u/RachFree)\
**Post date:** [July 18, 2025, 4:09am UTC](https://discourse.mc-stan.org/t/intercept-not-converging-in-brms-multilevel-models-with-intensive-longitudinal-data/39896/10 "2025-07-18T04:09:23Z")

</div>

Thanks for your detailed suggestions!

- Apologies - I person mean centred the predictor variables, not the outcomes. I should have been clearer!
- Since the data are between 0 and 100 and scaling down to between 0 and 1 it doesn’t matter whether you centred first or last, it is the same. Scaling does change the coefs and their CIs - they now represent change in probability of the outcome for every 100 point increase in the predictor.
- I haven’t - will look this up thanks!
- I’ve tried running brms without replacing the 1s and the models throw an error, so I have to replace… I think I’d need to run a ZOIB to include actual 1s…

Further to my post I believe I’ve discovered the issue! I ran a fixed intercept only model and the intercept converged perfectly. Then, I included random intercepts and the intercept failed to converge spectacularly. After a little visualisation it seems that there is insufficient within-person variability in participants’ baseline outcome (in this case I was using negative emotion as the outcome, so I’m talking about within person sd in negative emotion). So the data are not supporting the random intercept, even though it is conceptually and theoretically meaningful to include the random intercept. I’ve tried a bit of a workaround by fixing the random intercept and including both within (person mean centred) and between (person mean) parts in the models. The within-person coefficients haven’t changed drastically and all parts of the model have converged well.

So my model now looks like this:

```no-highlight
brm(
  formula = bf(
    negemo_ZIB ~ 1 +
      pmc_negemo_lag + pm_negemo_lag +
      pmc_persp * pmc_accept +
      pm_persp * pm_accept +
      (0 + pmc_negemo_lag + pmc_persp * pmc_accept | ID),
    
    zi ~ 1 +
      pmc_negemo_lag + pm_negemo_lag +
      pmc_persp * pmc_accept +
      pm_persp * pm_accept +
      (0 + pmc_negemo_lag + pmc_persp * pmc_accept | ID)
  ),
  data = data,
  family = zero_inflated_beta()

```

Do you see anything wrong with doing this?

---

<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:** [July 18, 2025, 3:02pm UTC](https://discourse.mc-stan.org/t/intercept-not-converging-in-brms-multilevel-models-with-intensive-longitudinal-data/39896/11 "2025-07-18T15:02:57Z")

</div>

Yes, you’d need a ZOIB to include the actual 1s.
