# \#conditional-effects

**URL:** https://discourse.mc-stan.org/tag/conditional-effects/145.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)

---

## [Removing mean line from spaghetti plot in conditional\_effects](https://discourse.mc-stan.org/t/removing-mean-line-from-spaghetti-plot-in-conditional-effects/39825)

<div class="topic-metadata">

**Author:** [@tsroth](https://discourse.mc-stan.org/u/tsroth)\
**Replies:** 2\
**Last updated:** [July 2, 2025, 8:59am UTC](https://discourse.mc-stan.org/t/removing-mean-line-from-spaghetti-plot-in-conditional-effects/39825 "2025-07-02T08:59:39Z")

</div>

Hello everyone, I am currently trying to create a spaghetti plot without a mean regression line using conditional\_effects. I thought that mean = FALSE could be used to remove the regression line. However, despite adding…

---

## [Find the predictor value at which posterior\_epred(model) = x (in a multilevel logistic regression)](https://discourse.mc-stan.org/t/find-the-predictor-value-at-which-posterior-epred-model-x-in-a-multilevel-logistic-regression/38640)

<div class="topic-metadata">

**Author:** [@Ladislas](https://discourse.mc-stan.org/u/Ladislas)\
**Replies:** 8\
**Last updated:** [February 25, 2025, 3:30pm UTC](https://discourse.mc-stan.org/t/find-the-predictor-value-at-which-posterior-epred-model-x-in-a-multilevel-logistic-regression/38640 "2025-02-25T15:30:56Z")

</div>

Context Hello, I am modelling behavioural data with a multilevel model specified as: model \<- brm( formula = resp ~ 1 + test \* stim \* trial + (1 + test \* stim \* trial | dyad / ppt), family = bernoulli(link = "l…

---

## [Disrepancies in output of conditional\_effects() between Windows and Linux for the same model](https://discourse.mc-stan.org/t/disrepancies-in-output-of-conditional-effects-between-windows-and-linux-for-the-same-model/36526)

<div class="topic-metadata">

**Author:** [@Maxime](https://discourse.mc-stan.org/u/Maxime)\
**Replies:** 10\
**Last updated:** [February 11, 2025, 4:46pm UTC](https://discourse.mc-stan.org/t/disrepancies-in-output-of-conditional-effects-between-windows-and-linux-for-the-same-model/36526 "2025-02-11T16:46:17Z")

</div>

Hello all, I’ve been scratching my head with a strange issue I am facing with brms. I produced plots from a brms model under Windows using conditional\_effects(). I migrated my project to Linux and ensured that dependen…

---

## [Plotting conditional\_effects by factor level](https://discourse.mc-stan.org/t/plotting-conditional-effects-by-factor-level/38523)

<div class="topic-metadata">

**Author:** [@asovie](https://discourse.mc-stan.org/u/asovie)\
**Replies:** 2\
**Last updated:** [January 20, 2025, 4:48pm UTC](https://discourse.mc-stan.org/t/plotting-conditional-effects-by-factor-level/38523 "2025-01-20T16:48:04Z")

</div>

Hi, I am trying to plot the conditional effects of a gamm fit with brms, the categorical predictor (ECO\_GROUP2) has 7 levels so the resulting plot is very busy. Is there a way to only plot a subset of the levels (i.e. …

---

## [Conditional\_effects() plots from brms model has a response category with consistent 0 probability (flat plot)](https://discourse.mc-stan.org/t/conditional-effects-plots-from-brms-model-has-a-response-category-with-consistent-0-probability-flat-plot/35774)

<div class="topic-metadata">

**Author:** [@LeoJha](https://discourse.mc-stan.org/u/LeoJha)\
**Replies:** 1\
**Last updated:** [July 23, 2024, 9:22pm UTC](https://discourse.mc-stan.org/t/conditional-effects-plots-from-brms-model-has-a-response-category-with-consistent-0-probability-flat-plot/35774 "2024-07-23T21:22:23Z")

</div>

Hello, I have a multinomial logistic regression model (code below) using brm() with the response variable is six different species. Model converges nicely and the summary output (see below) shows that one of the six spe…

---

## [Cross-conditional dependence in random walk models](https://discourse.mc-stan.org/t/cross-conditional-dependence-in-random-walk-models/34980)

<div class="topic-metadata">

**Author:** [@MigueBeneito](https://discourse.mc-stan.org/u/MigueBeneito)\
**Replies:** 1\
**Last updated:** [May 1, 2024, 6:45pm UTC](https://discourse.mc-stan.org/t/cross-conditional-dependence-in-random-walk-models/34980 "2024-05-01T18:45:18Z")

</div>

Hi, I have programmed two 1st-order random walk models that, in principle, should be equivalent but I obtain different results. The first model corresponds to a full-conditional formulation of a Poisson time series wher…

---

## [Conditional\_effects() producing different Expected Values than fitted()](https://discourse.mc-stan.org/t/conditional-effects-producing-different-expected-values-than-fitted/33559)

<div class="topic-metadata">

**Author:** [@blokeman](https://discourse.mc-stan.org/u/blokeman)\
**Replies:** 4\
**Last updated:** [December 13, 2023, 9:33am UTC](https://discourse.mc-stan.org/t/conditional-effects-producing-different-expected-values-than-fitted/33559 "2023-12-13T09:33:01Z")

</div>

I’m debating whether to plot predictor effects manually or with conditional\_effects(), and I’ve made the disturbing discovery that fitted.brmsfit(), which I use to calculate predictor effects manually, produces different…

---

## [Plotting predictions based on the linear combination of predictors](https://discourse.mc-stan.org/t/plotting-predictions-based-on-the-linear-combination-of-predictors/33386)

<div class="topic-metadata">

**Author:** [@achetverikov](https://discourse.mc-stan.org/u/achetverikov)\
**Replies:** 2\
**Last updated:** [November 21, 2023, 9:44am UTC](https://discourse.mc-stan.org/t/plotting-predictions-based-on-the-linear-combination-of-predictors/33386 "2023-11-21T09:44:29Z")

</div>

I am modelling a forced-choice task with two alternatives where each alternative is characterized by two parameters that are supposed to reflect some underlying signals. Since these parameters have the same effect on eac…

---

## [Marginalising conditional effects over a large grid of variables](https://discourse.mc-stan.org/t/marginalising-conditional-effects-over-a-large-grid-of-variables/31440)

<div class="topic-metadata">

**Author:** [@Supsup](https://discourse.mc-stan.org/u/Supsup)\
**Replies:** 0\
**Last updated:** [May 18, 2023, 10:49am UTC](https://discourse.mc-stan.org/t/marginalising-conditional-effects-over-a-large-grid-of-variables/31440 "2023-05-18T10:49:06Z")

</div>

Hi everyone, As a bit of context, I am fitting a non-linear model aiming to account for misclassification errors with a binary outcome using brms (R, 4.2.2). In a nutshell, the true probability of occurrence of the out…

---

## [Between-subject variance when plotting conditional effects](https://discourse.mc-stan.org/t/between-subject-variance-when-plotting-conditional-effects/31414)

<div class="topic-metadata">

**Author:** [@ivan\_grahek](https://discourse.mc-stan.org/u/ivan_grahek)\
**Replies:** 2\
**Last updated:** [May 17, 2023, 10:20pm UTC](https://discourse.mc-stan.org/t/between-subject-variance-when-plotting-conditional-effects/31414 "2023-05-17T22:20:14Z")

</div>

Hi all, When plotting/extracting conditional effects (e.g., using posterior\_epred / conditional\_effects) credible intervals for a given effect will include all uncertainty including, for example, the between-subject dif…

---

## [Is it possible to regroup conditional\_effects outcome variable for clearer plot](https://discourse.mc-stan.org/t/is-it-possible-to-regroup-conditional-effects-outcome-variable-for-clearer-plot/29453)

<div class="topic-metadata">

**Author:** [@jroon](https://discourse.mc-stan.org/u/jroon)\
**Replies:** 2\
**Last updated:** [November 15, 2022, 12:20pm UTC](https://discourse.mc-stan.org/t/is-it-possible-to-regroup-conditional-effects-outcome-variable-for-clearer-plot/29453 "2022-11-15T12:20:03Z")

</div>

I have an ordinal model and wish to plot conditional effects for an important variable. The problem is the outcome variable has 10 levels and the resulting plot is too difficult to interpret. To pick a particularly seve…

---

## [How can I combine credible intervals when there are differences in slope terms from interactions?](https://discourse.mc-stan.org/t/how-can-i-combine-credible-intervals-when-there-are-differences-in-slope-terms-from-interactions/25604)

<div class="topic-metadata">

**Author:** [@adkane](https://discourse.mc-stan.org/u/adkane)\
**Replies:** 10\
**Last updated:** [October 5, 2022, 12:11pm UTC](https://discourse.mc-stan.org/t/how-can-i-combine-credible-intervals-when-there-are-differences-in-slope-terms-from-interactions/25604 "2022-10-05T12:11:50Z")

</div>

I would like to calculate credible intervals for the slopes of a model with continuous by categorical interactions. However, in R output, I get a measure of slope for the baseline for one factor and the differences for t…

---

## [Plotting conditional effects for model with subsetted missing data](https://discourse.mc-stan.org/t/plotting-conditional-effects-for-model-with-subsetted-missing-data/29008)

<div class="topic-metadata">

**Author:** [@scott.claessens](https://discourse.mc-stan.org/u/scott.claessens)\
**Replies:** 0\
**Last updated:** [October 3, 2022, 12:14am UTC](https://discourse.mc-stan.org/t/plotting-conditional-effects-for-model-with-subsetted-missing-data/29008 "2022-10-03T00:14:06Z")

</div>

I am trying to plot conditional effects predictions for the model fit3 included in the ?mi help documentation. The model fits fine, but I’m unable to run the conditional\_effects() function, or the fitted() function for t…

---

## [Why are the data points on my conditional plot different to those on a raw plot?](https://discourse.mc-stan.org/t/why-are-the-data-points-on-my-conditional-plot-different-to-those-on-a-raw-plot/28888)

<div class="topic-metadata">

**Author:** [@adkane](https://discourse.mc-stan.org/u/adkane)\
**Replies:** 1\
**Last updated:** [September 19, 2022, 9:06pm UTC](https://discourse.mc-stan.org/t/why-are-the-data-points-on-my-conditional-plot-different-to-those-on-a-raw-plot/28888 "2022-09-19T21:06:09Z")

</div>

I’m running a model of population counts as a function of time with an interaction of the location. My models run fine and the fit looks good. However, when I compare a conditional effects plot: plot(conditional\_effects…

---

## [How to control the size of the uncertainty intervals when plotting conditional effects?](https://discourse.mc-stan.org/t/how-to-control-the-size-of-the-uncertainty-intervals-when-plotting-conditional-effects/28867)

<div class="topic-metadata">

**Author:** [@adkane](https://discourse.mc-stan.org/u/adkane)\
**Replies:** 1\
**Last updated:** [September 19, 2022, 10:58am UTC](https://discourse.mc-stan.org/t/how-to-control-the-size-of-the-uncertainty-intervals-when-plotting-conditional-effects/28867 "2022-09-19T10:58:31Z")

</div>

When I try to plot my model I cannot control the size of the uncertainty intervals around the conditional effects. I have large uncertainty and would like to be able to see a plot without uncertainty intervals. I see you…

---

## [Conditioning a random variable on the sum of random variables](https://discourse.mc-stan.org/t/conditioning-a-random-variable-on-the-sum-of-random-variables/28676)

<div class="topic-metadata">

**Author:** [@lucasmoschen](https://discourse.mc-stan.org/u/lucasmoschen)\
**Replies:** 2\
**Last updated:** [August 31, 2022, 8:11pm UTC](https://discourse.mc-stan.org/t/conditioning-a-random-variable-on-the-sum-of-random-variables/28676 "2022-08-31T20:11:00Z")

</div>

Hello, there! I recently faced a problem with sampling and wanted to share it with you guys. Maybe someone can help me out! Suppose we have two random variables X \\sim F\_{\\alpha} and Y \\sim F\_{\\beta} with known \\alpha a…

---

## [Conditional effects and summary estimate showing opposite results](https://discourse.mc-stan.org/t/conditional-effects-and-summary-estimate-showing-opposite-results/28157)

<div class="topic-metadata">

**Author:** [@apadillapozo](https://discourse.mc-stan.org/u/apadillapozo)\
**Replies:** 8\
**Last updated:** [July 12, 2022, 8:54am UTC](https://discourse.mc-stan.org/t/conditional-effects-and-summary-estimate-showing-opposite-results/28157 "2022-07-12T08:54:11Z")

</div>

Hi everyone, This is my first time posting in the forums, I apologize in advance if I made any formatting mistakes. I have my data and models stored in an .Rdata file, but it is 616mb, so I can’t upload it. If anyone te…

---

## [How do we obtain the response value estimates from a stanfit object just as we would get from the function conditional\_effect() with a brmsfit object?](https://discourse.mc-stan.org/t/how-do-we-obtain-the-response-value-estimates-from-a-stanfit-object-just-as-we-would-get-from-the-function-conditional-effect-with-a-brmsfit-object/27740)

<div class="topic-metadata">

**Author:** [@GabrielSass](https://discourse.mc-stan.org/u/GabrielSass)\
**Replies:** 0\
**Last updated:** [June 6, 2022, 6:01pm UTC](https://discourse.mc-stan.org/t/how-do-we-obtain-the-response-value-estimates-from-a-stanfit-object-just-as-we-would-get-from-the-function-conditional-effect-with-a-brmsfit-object/27740 "2022-06-06T18:01:57Z")

</div>

Hi, I am wondering if it is possible to obtain response value estimates (estimate\_\_ column) that you obtain when doing conditional\_effects(brmsfit) but if instead of a brmsfit object, I only have a stanfit object. I am …

---

## [Brms: Plotting three-way interactions with ordinal regression](https://discourse.mc-stan.org/t/brms-plotting-three-way-interactions-with-ordinal-regression/17621)

<div class="topic-metadata">

**Author:** [@Ben](https://discourse.mc-stan.org/u/Ben)\
**Replies:** 5\
**Last updated:** [June 6, 2022, 3:39pm UTC](https://discourse.mc-stan.org/t/brms-plotting-three-way-interactions-with-ordinal-regression/17621 "2022-06-06T15:39:04Z")

</div>

Operating system: Ubuntu 18.04.5 LTS brms version: 2.13.5 I have run an ordinal regression using brms and now am trying to plot the effect of three categorical predictors (Morphology, Cluster2, CountryExperiment) on th…

---

## [How to have conditional\_effects plots display actual category values in facet labels, rather than generic integers](https://discourse.mc-stan.org/t/how-to-have-conditional-effects-plots-display-actual-category-values-in-facet-labels-rather-than-generic-integers/27311)

<div class="topic-metadata">

**Author:** [@joels](https://discourse.mc-stan.org/u/joels)\
**Replies:** 2\
**Last updated:** [May 16, 2022, 7:05am UTC](https://discourse.mc-stan.org/t/how-to-have-conditional-effects-plots-display-actual-category-values-in-facet-labels-rather-than-generic-integers/27311 "2022-05-16T07:05:51Z")

</div>

If I specify a categorical variable for the conditions argument in conditional\_effects, the resulting plot is facetted by the levels of the categorical variable. However, rather than using the actual value labels in the …

---

## [Comparing conditional\_effects from multiple models in one plot?](https://discourse.mc-stan.org/t/comparing-conditional-effects-from-multiple-models-in-one-plot/16147)

<div class="topic-metadata">

**Author:** [@lakemonster](https://discourse.mc-stan.org/u/lakemonster)\
**Replies:** 2\
**Last updated:** [May 11, 2022, 8:50am UTC](https://discourse.mc-stan.org/t/comparing-conditional-effects-from-multiple-models-in-one-plot/16147 "2022-05-11T08:50:01Z")

</div>

I am fitting dozens of models to the same set of population and group effects. I’m interested in determining the effect of genetic admixture on a set of traits. Instead of presenting the reader with dozens of conditional…

---

## [Why don't lines from my conditional effects plots pass through the data points?](https://discourse.mc-stan.org/t/why-dont-lines-from-my-conditional-effects-plots-pass-through-the-data-points/25887)

<div class="topic-metadata">

**Author:** [@adkane](https://discourse.mc-stan.org/u/adkane)\
**Replies:** 2\
**Last updated:** [January 6, 2022, 4:59pm UTC](https://discourse.mc-stan.org/t/why-dont-lines-from-my-conditional-effects-plots-pass-through-the-data-points/25887 "2022-01-06T16:59:56Z")

</div>

I’m fitting a model of population counts over time in three different locations with some random effects structure. The model fits fine using brms but when I plot the conditional effects the lines of the resultant graph …

---

## [Brms::conditional\_effects plots all 2-way interactions](https://discourse.mc-stan.org/t/brms-conditional-effects-plots-all-2-way-interactions/24213)

<div class="topic-metadata">

**Author:** [@ZF13](https://discourse.mc-stan.org/u/ZF13)\
**Replies:** 2\
**Last updated:** [September 3, 2021, 6:25pm UTC](https://discourse.mc-stan.org/t/brms-conditional-effects-plots-all-2-way-interactions/24213 "2021-09-03T18:25:45Z")

</div>

Hi, Recently I was plotting the conditional effects of the following model: fit ← (cat1, cat2, cat3) ~ Var1 + Var2 + Var3 + Var1 \* Var2 In order to plot the interaction, I used the following code: conditions \<- brms…

---

## [IRT: Discrepancy in estimates hypothesis & conditional effects](https://discourse.mc-stan.org/t/irt-discrepancy-in-estimates-hypothesis-conditional-effects/22438)

<div class="topic-metadata">

**Author:** [@elineadrianne](https://discourse.mc-stan.org/u/elineadrianne)\
**Replies:** 8\
**Last updated:** [May 17, 2021, 11:19pm UTC](https://discourse.mc-stan.org/t/irt-discrepancy-in-estimates-hypothesis-conditional-effects/22438 "2021-05-17T23:19:00Z")

</div>

Hi all, We have been trying out IRT modelling as perfectly demonstrated by @paul.buerkner, but are having some issues with interpreting the estimates resulting from the fitted model. In particular, we are finding a disc…

---

## [How to properly compare interacting levels](https://discourse.mc-stan.org/t/how-to-properly-compare-interacting-levels/20457)

<div class="topic-metadata">

**Author:** [@striatum](https://discourse.mc-stan.org/u/striatum)\
**Replies:** 8\
**Last updated:** [February 2, 2021, 6:16pm UTC](https://discourse.mc-stan.org/t/how-to-properly-compare-interacting-levels/20457 "2021-02-02T18:16:31Z")

</div>

I am new to brms, trying to figure out its behaviour in details. I was trying to run essentially an anova-like model with random effects (anova-like in the sense that all IVs are factors). For example, brm(DV ~ A \* …

---

## [Modeling and visualizing ordinal data with different response scales](https://discourse.mc-stan.org/t/modeling-and-visualizing-ordinal-data-with-different-response-scales/19699)

<div class="topic-metadata">

**Author:** [@dana-and-monsters](https://discourse.mc-stan.org/u/dana-and-monsters)\
**Replies:** 4\
**Last updated:** [December 12, 2020, 8:53am UTC](https://discourse.mc-stan.org/t/modeling-and-visualizing-ordinal-data-with-different-response-scales/19699 "2020-12-12T08:53:24Z")

</div>

I have a dataset where participants responded to questions that have 2 different response scales: one response scale was 1-5 (see attached data: variable = connection\_artist\_general and connection\_audience\_general) and t…

---

## [Conditional distribution](https://discourse.mc-stan.org/t/conditional-distribution/18722)

<div class="topic-metadata">

**Author:** [@nbanho](https://discourse.mc-stan.org/u/nbanho)\
**Replies:** 5\
**Last updated:** [October 22, 2020, 6:43am UTC](https://discourse.mc-stan.org/t/conditional-distribution/18722 "2020-10-22T06:43:50Z")

</div>

Hi there, I am using cmdstanr and the posterior package. I would like to compare the distribution of parameters \\theta\_1, \\dots, \\theta\_7 conditional on different values for a set of other parameters \\alpha\_1, \\dots, \\a…

---

## [Split conditional\_effects plot in facets according to the value of the categorical DV](https://discourse.mc-stan.org/t/split-conditional-effects-plot-in-facets-according-to-the-value-of-the-categorical-dv/17650)

<div class="topic-metadata">

**Author:** [@Elisa](https://discourse.mc-stan.org/u/Elisa)\
**Replies:** 1\
**Last updated:** [August 27, 2020, 9:11am UTC](https://discourse.mc-stan.org/t/split-conditional-effects-plot-in-facets-according-to-the-value-of-the-categorical-dv/17650 "2020-08-27T09:11:57Z")

</div>

I use conditional\_effects to plot my ordinal model, and would like to split the curves into different facets, but I can’t figure out how. The plot I get is: But here is a minimal reproducible example library(tidyver…

---

## [Creating polynomial contrast for parameters](https://discourse.mc-stan.org/t/creating-polynomial-contrast-for-parameters/16592)

<div class="topic-metadata">

**Author:** [@rreareyes](https://discourse.mc-stan.org/u/rreareyes)\
**Replies:** 4\
**Last updated:** [July 30, 2020, 6:01pm UTC](https://discourse.mc-stan.org/t/creating-polynomial-contrast-for-parameters/16592 "2020-07-30T18:01:19Z")

</div>

Hi everyone, I fitted a model using brms using the following formula: first1.1 \<- brm(data = first, family = multinomial(refcat = NA, link = logit), …

---

## [Standard error vs sd in brms' conditional\_effects](https://discourse.mc-stan.org/t/standard-error-vs-sd-in-brms-conditional-effects/16309)

<div class="topic-metadata">

**Author:** [@scholz](https://discourse.mc-stan.org/u/scholz)\
**Replies:** 6\
**Last updated:** [July 1, 2020, 10:09am UTC](https://discourse.mc-stan.org/t/standard-error-vs-sd-in-brms-conditional-effects/16309 "2020-07-01T10:09:50Z")

</div>

Hey, I was wondering about the output of the conditional\_effects() function, especially about the interpretation of the standard error. Until now I was assuming, that the standard error was the same as the standard dev…

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