# \#brms

**URL:** https://discourse.mc-stan.org/tag/brms/173.md

[Latest](https://discourse.mc-stan.org/latest.md) · [Categories](https://discourse.mc-stan.org/categories.md) · [Tags](https://discourse.mc-stan.org/tags.md)

---

## [Cmdstanr g++ permission denied](https://discourse.mc-stan.org/t/cmdstanr-g-permission-denied/41805)

<div class="topic-metadata">

**Author:** [@RElahi](https://discourse.mc-stan.org/u/RElahi)\
**Replies:** 12\
**Last updated:** [November 6, 2026, 6:36pm UTC](https://discourse.mc-stan.org/t/cmdstanr-g-permission-denied/41805 "2026-11-06T18:36:35Z")

</div>

My Windows machine recently updated its OS, which seems to have messed up a lot of my R packages. I was able to fix all of them, but now I cannot compile brms models using cmdstanr. I tried reinstalling rstan, cmdstanr, …

---

## [Log Student-t comparing differences in scale](https://discourse.mc-stan.org/t/log-student-t-comparing-differences-in-scale/41729)

<div class="topic-metadata">

**Author:** [@Hunter24](https://discourse.mc-stan.org/u/Hunter24)\
**Replies:** 2\
**Last updated:** [November 6, 2026, 6:41am UTC](https://discourse.mc-stan.org/t/log-student-t-comparing-differences-in-scale/41729 "2026-11-06T06:41:04Z")

</div>

I am doing a log student t distribution. All nu values are above 2 so both mean and variance exist. I want to compare the log sigmas between groups, so taking the difference in the posteriors of log sigma\_group1 - log s…

---

## [Open data and brms code for soil carbon spectroscopy prediction](https://discourse.mc-stan.org/t/open-data-and-brms-code-for-soil-carbon-spectroscopy-prediction/41667)

<div class="topic-metadata">

**Author:** [@potash](https://discourse.mc-stan.org/u/potash)\
**Replies:** 19\
**Last updated:** [November 5, 2026, 7:04pm UTC](https://discourse.mc-stan.org/t/open-data-and-brms-code-for-soil-carbon-spectroscopy-prediction/41667 "2026-11-05T19:04:04Z")

</div>

We just published a paper in the European Journal of Soil Science using Stan to fit a spectroscopy prediction model. Code and data using brms and targets is here. In this problem the predictor is a spectroscopy scan, e.…

---

## [Should I change intercept priors when using sum coding?](https://discourse.mc-stan.org/t/should-i-change-intercept-priors-when-using-sum-coding/41745)

<div class="topic-metadata">

**Author:** [@bertiebear](https://discourse.mc-stan.org/u/bertiebear)\
**Replies:** 6\
**Last updated:** [November 4, 2026, 8:37pm UTC](https://discourse.mc-stan.org/t/should-i-change-intercept-priors-when-using-sum-coding/41745 "2026-11-04T20:37:33Z")

</div>

Hello everyone, I’ve been learning Bayesian statistics with brms for a while now, and I’ve used Bayesian linear regression in some cases. My programme (Master’s in Public Health) doesn’t deal with Bayesian statistics at …

---

## [Bmm 1.4.1: signal detection and MPT models on CRAN](https://discourse.mc-stan.org/t/bmm-1-4-1-signal-detection-and-mpt-models-on-cran/41683)

<div class="topic-metadata">

**Author:** [@g.frischkorn](https://discourse.mc-stan.org/u/g.frischkorn)\
**Replies:** 2\
**Last updated:** [October 19, 2026, 6:32pm UTC](https://discourse.mc-stan.org/t/bmm-1-4-1-signal-detection-and-mpt-models-on-cran/41683 "2026-10-19T18:32:29Z")

</div>

bmm (Bayesian Measurement Modeling) fits hierarchical measurement models of cognition through brms and Stan. Version 1.4.1 adds signal detection theory models for yes/no, m-AFC, ranking, confidence-rating (with dual-proc…

---

## [Dependence between binary responses in multivariate brms](https://discourse.mc-stan.org/t/dependence-between-binary-responses-in-multivariate-brms/41608)

<div class="topic-metadata">

**Author:** [@JKingston](https://discourse.mc-stan.org/u/JKingston)\
**Replies:** 5\
**Last updated:** [September 20, 2026, 8:49pm UTC](https://discourse.mc-stan.org/t/dependence-between-binary-responses-in-multivariate-brms/41608 "2026-09-20T20:49:11Z")

</div>

I have data in which participants chose between 4 possible responses on each trial. The 4 responses are best understood, however, as two binary choices, i.e., “w” vs “b” and “2” vs “1”. What I want to get from the model …

---

## [How to specify non centered parameterization for sigma in a distributional model in brms](https://discourse.mc-stan.org/t/how-to-specify-non-centered-parameterization-for-sigma-in-a-distributional-model-in-brms/41570)

<div class="topic-metadata">

**Author:** [@rstanuser](https://discourse.mc-stan.org/u/rstanuser)\
**Replies:** 8\
**Last updated:** [September 7, 2026, 11:13pm UTC](https://discourse.mc-stan.org/t/how-to-specify-non-centered-parameterization-for-sigma-in-a-distributional-model-in-brms/41570 "2026-09-07T23:13:28Z")

</div>

I want to fit a distributional model with brms along the following lines: df \<- data.frame() # some columns include: # value (continuous, zero-mean), # afactor (3 levels), bfactor (7 levels), # gfactor (240 level…

---

## [LOO with brms::add\_criterion crashes the R session](https://discourse.mc-stan.org/t/loo-with-brms-add-criterion-crashes-the-r-session/41554)

<div class="topic-metadata">

**Author:** [@Anoban](https://discourse.mc-stan.org/u/Anoban)\
**Replies:** 5\
**Last updated:** [September 2, 2026, 1:22pm UTC](https://discourse.mc-stan.org/t/loo-with-brms-add-criterion-crashes-the-r-session/41554 "2026-09-02T13:22:47Z")

</div>

Hi folks, I’m trying to compare 8 brms models (6 as of now, still waiting for two to finish) using loo with moment\_match = TRUE but keep constantly running into crashes where the OS kills the R process. These models are…

---

## [Comparing loo of discretised versions of hurdle lognormal and normal models](https://discourse.mc-stan.org/t/comparing-loo-of-discretised-versions-of-hurdle-lognormal-and-normal-models/41559)

<div class="topic-metadata">

**Author:** [@llewmills](https://discourse.mc-stan.org/u/llewmills)\
**Replies:** 5\
**Last updated:** [August 31, 2026, 11:04pm UTC](https://discourse.mc-stan.org/t/comparing-loo-of-discretised-versions-of-hurdle-lognormal-and-normal-models/41559 "2026-08-31T23:04:39Z")

</div>

I am trying to evaluate the relative performance of a hurdle lognormal model against a standard linear/gaussian model, conducted on the same data, a right-skewed integer 0-100 scale with a lot of 0’s and a normal-ish dis…

---

## [Comparing a hurdle lognormal model to a gaussian model with loo-cv](https://discourse.mc-stan.org/t/comparing-a-hurdle-lognormal-model-to-a-gaussian-model-with-loo-cv/41532)

<div class="topic-metadata">

**Author:** [@llewmills](https://discourse.mc-stan.org/u/llewmills)\
**Replies:** 2\
**Last updated:** [August 26, 2026, 10:23am UTC](https://discourse.mc-stan.org/t/comparing-a-hurdle-lognormal-model-to-a-gaussian-model-with-loo-cv/41532 "2026-08-26T10:23:37Z")

</div>

I have been posting a lot lately about comparing models with different link functions fit to the same data (see here and here). This post is an extension of those. I am simply wondering if I can compare a hurdle lognorm…

---

## [Student\_t](https://discourse.mc-stan.org/t/student-t/41526)

<div class="topic-metadata">

**Author:** [@Hunter24](https://discourse.mc-stan.org/u/Hunter24)\
**Replies:** 5\
**Last updated:** [August 22, 2026, 12:49pm UTC](https://discourse.mc-stan.org/t/student-t/41526 "2026-08-22T12:49:00Z")

</div>

When fitting a Student-t model, how should the posterior distribution of the degrees-of-freedom parameter (ν) affect interpretation of the mean and variance? If most of the posterior for ν is above 2, but some probabilit…

---

## [Multiresponse brms models - chains finishing unexpectedly](https://discourse.mc-stan.org/t/multiresponse-brms-models-chains-finishing-unexpectedly/41534)

<div class="topic-metadata">

**Author:** [@Anoban](https://discourse.mc-stan.org/u/Anoban)\
**Replies:** 2\
**Last updated:** [August 21, 2026, 1:58am UTC](https://discourse.mc-stan.org/t/multiresponse-brms-models-chains-finishing-unexpectedly/41534 "2026-08-21T01:58:35Z")

</div>

Hi there! (I was redirected from github here). I’m running a set of phylogenetic and non-phylogenetic brms models on a Ubuntu 24.04.4 server with brms version 2.23.0, cmdstanr version 0.9.0 and R version 4.6.1, using cm…

---

## [Divergent transitions fitting smooths in brms](https://discourse.mc-stan.org/t/divergent-transitions-fitting-smooths-in-brms/41517)

<div class="topic-metadata">

**Author:** [@PaulVBell](https://discourse.mc-stan.org/u/PaulVBell)\
**Replies:** 6\
**Last updated:** [August 18, 2026, 8:48am UTC](https://discourse.mc-stan.org/t/divergent-transitions-fitting-smooths-in-brms/41517 "2026-08-18T08:48:47Z")

</div>

I’m trying to get my head around using smoothing splines with brms. I generated a simple dataset (sin wave plus normal noise): And fit the following brms model, for B-splines with 10 knots: fit\_brms \<- brm( y ~ s…

---

## [Ppc\_loo\_pit\_overlay](https://discourse.mc-stan.org/t/ppc-loo-pit-overlay/41501)

<div class="topic-metadata">

**Author:** [@Hunter24](https://discourse.mc-stan.org/u/Hunter24)\
**Replies:** 5\
**Last updated:** [August 13, 2026, 2:13pm UTC](https://discourse.mc-stan.org/t/ppc-loo-pit-overlay/41501 "2026-08-13T14:13:39Z")

</div>

I am try to see if my model is valid. I ran a beta glmm in brms. brm.formula.1 \<- bf( prop ~ 0 + group + # Group-specific independent random intercepts and slopes (1 | gr(ID, by = group)) + # OU correlat…

---

## [Difficulty adding loo criterion to longitudinal truncated normal model](https://discourse.mc-stan.org/t/difficulty-adding-loo-criterion-to-longitudinal-truncated-normal-model/41447)

<div class="topic-metadata">

**Author:** [@llewmills](https://discourse.mc-stan.org/u/llewmills)\
**Replies:** 14\
**Last updated:** [July 24, 2026, 8:44am UTC](https://discourse.mc-stan.org/t/difficulty-adding-loo-criterion-to-longitudinal-truncated-normal-model/41447 "2026-07-24T08:44:14Z")

</div>

I am analysing data from a clinical trial comparing placebo to active medication at multiple timepoint. One of my outcomes has a pronounced right-skew. The overwhelming majority of observations are between 0 and 0.03 but…

---

## [Extremely slow phylogenetic mixed model in brms](https://discourse.mc-stan.org/t/extremely-slow-phylogenetic-mixed-model-in-brms/41437)

<div class="topic-metadata">

**Author:** [@Anoban](https://discourse.mc-stan.org/u/Anoban)\
**Replies:** 5\
**Last updated:** [July 20, 2026, 12:46am UTC](https://discourse.mc-stan.org/t/extremely-slow-phylogenetic-mixed-model-in-brms/41437 "2026-07-20T00:46:30Z")

</div>

Hi folks, I have the following multiresponse phylogenetic mixed model in brms : model \<- brms::brm(brms::brmsformula(mvbind(t1, t2, t3) ~ state + (1|p|gr(binominal, cov = corrmat)) + (1|q|taxa)) + set\_rescor(TRUE), dat…

---

## [Issues with phylogenetic model fit](https://discourse.mc-stan.org/t/issues-with-phylogenetic-model-fit/41433)

<div class="topic-metadata">

**Author:** [@dasyuridae](https://discourse.mc-stan.org/u/dasyuridae)\
**Replies:** 1\
**Last updated:** [July 13, 2026, 6:00pm UTC](https://discourse.mc-stan.org/t/issues-with-phylogenetic-model-fit/41433 "2026-07-13T18:00:17Z")

</div>

Hi! I’m a PhD student trying to do a phylogenetic variance decomposition for the first time - it was meant to be a quick extra analysis for a paper but, predictably, is becoming a bit of a headache. This is an analysis …

---

## [Multilevel multiresponse phylogenetic mixed models with brms](https://discourse.mc-stan.org/t/multilevel-multiresponse-phylogenetic-mixed-models-with-brms/41411)

<div class="topic-metadata">

**Author:** [@Anoban](https://discourse.mc-stan.org/u/Anoban)\
**Replies:** 4\
**Last updated:** [July 10, 2026, 2:48am UTC](https://discourse.mc-stan.org/t/multilevel-multiresponse-phylogenetic-mixed-models-with-brms/41411 "2026-07-10T02:48:26Z")

</div>

Hi folks! I’m a 2nd year PhD student studying root ecological strategies and mycorrhizal outsourcing. I’m interested in understanding how the evolution of three response variables (three root traits) is influenced by a …

---

## [How can I deal with this heteroskedastic model?](https://discourse.mc-stan.org/t/how-can-i-deal-with-this-heteroskedastic-model/41432)

<div class="topic-metadata">

**Author:** [@Leonardo](https://discourse.mc-stan.org/u/Leonardo)\
**Replies:** 1\
**Last updated:** [July 8, 2026, 10:08pm UTC](https://discourse.mc-stan.org/t/how-can-i-deal-with-this-heteroskedastic-model/41432 "2026-07-08T22:08:08Z")

</div>

Hi all. I am interested in the latency it takes to flies to get attacked by predators, and the relationship between such latency and several covariates. I tested each spider more than once, so spider ID is a random fact…

---

## ["get\_prior() shows only one group random intercept prior when using gr(by = ...), shouldn't there be two as this model assumes groups being drawn from separate distributions?"](https://discourse.mc-stan.org/t/get-prior-shows-only-one-group-random-intercept-prior-when-using-gr-by-shouldnt-there-be-two-as-this-model-assumes-groups-being-drawn-from-separate-distributions/41428)

<div class="topic-metadata">

**Author:** [@hunter\_warick](https://discourse.mc-stan.org/u/hunter_warick)\
**Replies:** 0\
**Last updated:** [July 8, 2026, 7:53am UTC](https://discourse.mc-stan.org/t/get-prior-shows-only-one-group-random-intercept-prior-when-using-gr-by-shouldnt-there-be-two-as-this-model-assumes-groups-being-drawn-from-separate-distributions/41428 "2026-07-08T07:53:22Z")

</div>

Short summary of the problem brm.formula.1 \<- bf( y ~ 0 + group+ # Group-specific independent random intercepts (1 | gr(ID, by = group)), sigma ~ 0 + group ) prior\_1 \<- # coefficients prior(normal(l…

---

## [Why does changing the reference level wildly change the predicted probabilities?](https://discourse.mc-stan.org/t/why-does-changing-the-reference-level-wildly-change-the-predicted-probabilities/41399)

<div class="topic-metadata">

**Author:** [@FeliOtte](https://discourse.mc-stan.org/u/FeliOtte)\
**Replies:** 1\
**Last updated:** [June 26, 2026, 2:21pm UTC](https://discourse.mc-stan.org/t/why-does-changing-the-reference-level-wildly-change-the-predicted-probabilities/41399 "2026-06-26T14:21:31Z")

</div>

Hello everyone, I’m having some modelling issues and I’m hoping the answer to the question above might help. I am running a multinomial/categorical model in brms and am getting results that do not make sense for my data…

---

## [Computing approximate Gaussian processes](https://discourse.mc-stan.org/t/computing-approximate-gaussian-processes/41372)

<div class="topic-metadata">

**Author:** [@katiec](https://discourse.mc-stan.org/u/katiec)\
**Replies:** 6\
**Last updated:** [June 24, 2026, 12:07pm UTC](https://discourse.mc-stan.org/t/computing-approximate-gaussian-processes/41372 "2026-06-24T12:07:32Z")

</div>

Hi! I am very new to Bayesian Statistics, so please bear with me… I am testing the effects of extreme climate events on shorebird productivity (number of chicks). I have 33 years of data (1992-2025, missing 1998 data) a…

---

## [Prior/link selection for sigma in distributional Gaussian model](https://discourse.mc-stan.org/t/prior-link-selection-for-sigma-in-distributional-gaussian-model/41369)

<div class="topic-metadata">

**Author:** [@rstanuser](https://discourse.mc-stan.org/u/rstanuser)\
**Replies:** 3\
**Last updated:** [June 16, 2026, 3:12pm UTC](https://discourse.mc-stan.org/t/prior-link-selection-for-sigma-in-distributional-gaussian-model/41369 "2026-06-16T15:12:10Z")

</div>

I want to fit a distributional model with brms along the following lines: df \<- data.frame() # some columns include: value (continuous, zero-mean), afactor (3 levels), bfactor (7 levels), ... frml \<- bf( value ~ 0 + I…

---

## [Calculate indirect effects for a longitudinal Gaussian Process mediation model](https://discourse.mc-stan.org/t/calculate-indirect-effects-for-a-longitudinal-gaussian-process-mediation-model/41294)

<div class="topic-metadata">

**Author:** [@drnight](https://discourse.mc-stan.org/u/drnight)\
**Replies:** 1\
**Last updated:** [May 25, 2026, 12:24pm UTC](https://discourse.mc-stan.org/t/calculate-indirect-effects-for-a-longitudinal-gaussian-process-mediation-model/41294 "2026-05-25T12:24:09Z")

</div>

Hello, I am running a longitudinal mediation model with both the independent and the mediatior variables being time-varying (for 6 time points), using Gaussian Process in brms. Would be grateful if anyone could help me…

---

## [A faster implementation of hierarchical models](https://discourse.mc-stan.org/t/a-faster-implementation-of-hierarchical-models/41120)

<div class="topic-metadata">

**Author:** [@Rick\_RS95](https://discourse.mc-stan.org/u/Rick_RS95)\
**Replies:** 22\
**Last updated:** [May 20, 2026, 11:34am UTC](https://discourse.mc-stan.org/t/a-faster-implementation-of-hierarchical-models/41120 "2026-05-20T11:34:22Z")

</div>

Hi all! I am sure many of you know useful tricks to make hierarchical models fit faster. I have been trying different things for a while, and I would like to share a specification that is very fast and that, as far as I…

---

## [Using projpred with a hierarchical Stan model with posterior-draw measurement error](https://discourse.mc-stan.org/t/using-projpred-with-a-hierarchical-stan-model-with-posterior-draw-measurement-error/41082)

<div class="topic-metadata">

**Author:** [@ViktorVdV](https://discourse.mc-stan.org/u/ViktorVdV)\
**Replies:** 3\
**Last updated:** [May 7, 2026, 9:30am UTC](https://discourse.mc-stan.org/t/using-projpred-with-a-hierarchical-stan-model-with-posterior-draw-measurement-error/41082 "2026-05-07T09:30:20Z")

</div>

Hi all, I’m working with a Stan model where I explicitly propagate uncertainty from a previous model by using posterior draws as inputs. I’m now trying to perform predictor selection among 9 covariates that exhibit some…

---

## [Missing output variable path\_\_ with brms and pathfinder algorithm](https://discourse.mc-stan.org/t/missing-output-variable-path-with-brms-and-pathfinder-algorithm/41099)

<div class="topic-metadata">

**Author:** [@bmelinden](https://discourse.mc-stan.org/u/bmelinden)\
**Replies:** 2\
**Last updated:** [May 3, 2026, 9:11pm UTC](https://discourse.mc-stan.org/t/missing-output-variable-path-with-brms-and-pathfinder-algorithm/41099 "2026-05-03T21:11:54Z")

</div>

I have tried to experiment with the pathfinder algorithm with brms (2.23.0) and the cmdstan (2.38.0) backend, and run into Error: Can’t find the following variable(s) in the output: path\_\_ Here is a minimalist example …

---

## [Bayesian Causal Networks in R – Online Course (Sept 2026)](https://discourse.mc-stan.org/t/bayesian-causal-networks-in-r-online-course-sept-2026/41091)

<div class="topic-metadata">

**Author:** [@Carlo\_Pecoraro](https://discourse.mc-stan.org/u/Carlo_Pecoraro)\
**Replies:** 0\
**Last updated:** [April 30, 2026, 4:57pm UTC](https://discourse.mc-stan.org/t/bayesian-causal-networks-in-r-online-course-sept-2026/41091 "2026-04-30T16:57:49Z")

</div>

Bayesian Causal Networks in R 7–11 September 2026 Online (live sessions + recordings for global participation) Bayesian causal networks (Bayesian belief networks) are probabilistic graphical models used to represent co…

---

## [Using brms::hypothesis() with an interaction](https://discourse.mc-stan.org/t/using-brms-hypothesis-with-an-interaction/41069)

<div class="topic-metadata">

**Author:** [@lyambailey](https://discourse.mc-stan.org/u/lyambailey)\
**Replies:** 0\
**Last updated:** [April 24, 2026, 7:43pm UTC](https://discourse.mc-stan.org/t/using-brms-hypothesis-with-an-interaction/41069 "2026-04-24T19:43:31Z")

</div>

Dear users, I’m using brms to fit some data with an interaction effect. measure\_z is a standardized continuous variable, task is a factor with two levels (ON and OFF) and roi is a factor with 10+ levels (A, B, C, …). f…

---

## [Difference in modeling and fitting ordinal data using brms](https://discourse.mc-stan.org/t/difference-in-modeling-and-fitting-ordinal-data-using-brms/41049)

<div class="topic-metadata">

**Author:** [@REYZ](https://discourse.mc-stan.org/u/REYZ)\
**Replies:** 2\
**Last updated:** [April 20, 2026, 10:40pm UTC](https://discourse.mc-stan.org/t/difference-in-modeling-and-fitting-ordinal-data-using-brms/41049 "2026-04-20T22:40:03Z")

</div>

Hello! I am building a stan model (using rstan) to fit ordinal data (1-8 on a scale) from an experiment with two testing sessions. The effects of two independent variables and their interaction are modeled. I used a hie…

[Next page](https://discourse.mc-stan.org/tag/brms/173.md?match_all_tags=true&page=1&tags%5B%5D=brms)
