# \#prior-predictive

**URL:** https://discourse.mc-stan.org/tag/prior-predictive/142.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)

---

## [Homogeneity of variance / homoscedasticity in Bayesian models](https://discourse.mc-stan.org/t/homogeneity-of-variance-homoscedasticity-in-bayesian-models/39538)

<div class="topic-metadata">

**Author:** [@lukaseamus](https://discourse.mc-stan.org/u/lukaseamus)\
**Replies:** 5\
**Last updated:** [May 21, 2025, 4:43pm UTC](https://discourse.mc-stan.org/t/homogeneity-of-variance-homoscedasticity-in-bayesian-models/39538 "2025-05-21T16:43:54Z")

</div>

Homogeneity of variance, also homoscedasticity, is a major modelling assumption, which when using maximum likelihood is tested based on residual plots, i.e. is learned from the data. If data are heteroscedastic, variance…

---

## [Guidance on prior predictive checks in ordinal model](https://discourse.mc-stan.org/t/guidance-on-prior-predictive-checks-in-ordinal-model/34532)

<div class="topic-metadata">

**Author:** [@natpac](https://discourse.mc-stan.org/u/natpac)\
**Replies:** 37\
**Last updated:** [March 31, 2025, 1:24pm UTC](https://discourse.mc-stan.org/t/guidance-on-prior-predictive-checks-in-ordinal-model/34532 "2025-03-31T13:24:07Z")

</div>

Hello, Sorry in advance for the long post… I am working to fit an ordinal logistic regression with brms to species’ risk extinction categories (ranging in order from Low to High risk : 5 levels) vs several predictors (…

---

## [Prior predictive checks in survival modeling with a mixture prior](https://discourse.mc-stan.org/t/prior-predictive-checks-in-survival-modeling-with-a-mixture-prior/38329)

<div class="topic-metadata">

**Author:** [@mazin.abdelghany](https://discourse.mc-stan.org/u/mazin.abdelghany)\
**Replies:** 1\
**Last updated:** [December 31, 2024, 7:39pm UTC](https://discourse.mc-stan.org/t/prior-predictive-checks-in-survival-modeling-with-a-mixture-prior/38329 "2024-12-31T19:39:14Z")

</div>

Hi all, I recently posted for help to build a survival model using a mixture prior. I was able to run this model without issue, code below: data { int\<lower=0\> K; // num covariates int\<lower=0\> N; …

---

## [Comparision: simple AR(1) model in stan vs. pymc](https://discourse.mc-stan.org/t/comparision-simple-ar-1-model-in-stan-vs-pymc/37529)

<div class="topic-metadata">

**Author:** [@teagum](https://discourse.mc-stan.org/u/teagum)\
**Replies:** 4\
**Last updated:** [December 10, 2024, 9:10pm UTC](https://discourse.mc-stan.org/t/comparision-simple-ar-1-model-in-stan-vs-pymc/37529 "2024-12-10T21:10:17Z")

</div>

I’am trying to replicate an AR model I once code in PyMC. Th Stan version gives yield some different results and would like to know why this is the case. This is the PyMC code: with pm.Model() as pm\_model: rho = pm…

---

## [Sampled Priors for Intercept don't match the setting](https://discourse.mc-stan.org/t/sampled-priors-for-intercept-dont-match-the-setting/34288)

<div class="topic-metadata">

**Author:** [@RDuesing](https://discourse.mc-stan.org/u/RDuesing)\
**Replies:** 3\
**Last updated:** [February 28, 2024, 12:57pm UTC](https://discourse.mc-stan.org/t/sampled-priors-for-intercept-dont-match-the-setting/34288 "2024-02-28T12:57:14Z")

</div>

Hello! I try to run a quite simple multiple regression model for educational purposes. Before running the model I defined priors and wanted to conduct prior predictive checking by running the model with the option “sam…

---

## [Prior/posterior predictive distributions for an unconstrained/constrained PPO model](https://discourse.mc-stan.org/t/prior-posterior-predictive-distributions-for-an-unconstrained-constrained-ppo-model/31609)

<div class="topic-metadata">

**Author:** [@chrisselman](https://discourse.mc-stan.org/u/chrisselman)\
**Replies:** 0\
**Last updated:** [June 3, 2023, 6:15am UTC](https://discourse.mc-stan.org/t/prior-posterior-predictive-distributions-for-an-unconstrained-constrained-ppo-model/31609 "2023-06-03T06:15:15Z")

</div>

Hi all, I was wondering how one can use Stan to generate prior and posterior predictive distributions for partial proportional odds (PPO) models? I’ve provided code (written by Frank Harrell and Ben Goodrich, rmsb/inst/…

---

## [Brms doesn't appear to account for priors on \`sigma\` when using \`sample\_prior = "only"\`?](https://discourse.mc-stan.org/t/brms-doesnt-appear-to-account-for-priors-on-sigma-when-using-sample-prior-only/30978)

<div class="topic-metadata">

**Author:** [@nick\_l](https://discourse.mc-stan.org/u/nick_l)\
**Replies:** 2\
**Last updated:** [April 6, 2023, 5:36pm UTC](https://discourse.mc-stan.org/t/brms-doesnt-appear-to-account-for-priors-on-sigma-when-using-sample-prior-only/30978 "2023-04-06T17:36:47Z")

</div>

When I try to get prior predictive samples for a simple gaussian intercept model with brms, it appears to ignore priors on sigma. Is this intended? Is there a way to somehow override this behavior? Any insight is appr…

---

## [Problems with divergence for prior predictive checks for Gamma model](https://discourse.mc-stan.org/t/problems-with-divergence-for-prior-predictive-checks-for-gamma-model/30540)

<div class="topic-metadata">

**Author:** [@JAQuent](https://discourse.mc-stan.org/u/JAQuent)\
**Replies:** 4\
**Last updated:** [March 6, 2023, 9:15am UTC](https://discourse.mc-stan.org/t/problems-with-divergence-for-prior-predictive-checks-for-gamma-model/30540 "2023-03-06T09:15:33Z")

</div>

So, I am currently in search for suitable priors for my hierarchical gamma regression model for a cognitive task where human participants retrieve object locations in an area (measured: distance to true location as Eucli…

---

## [Prior Predictive Check From Tutorial](https://discourse.mc-stan.org/t/prior-predictive-check-from-tutorial/27743)

<div class="topic-metadata">

**Author:** [@dgerth5](https://discourse.mc-stan.org/u/dgerth5)\
**Replies:** 1\
**Last updated:** [June 6, 2022, 10:22pm UTC](https://discourse.mc-stan.org/t/prior-predictive-check-from-tutorial/27743 "2022-06-06T22:22:17Z")

</div>

Hello! I am following the Stan User Guide Tutorial for Prior Predictive Checks, and am running into a sampling issue. My code for the model is copied straight from the guide: data { int\<lower = 0\> N; vector\[N\] x; }…

---

## [Prior predictive check in distributional mixed model including uniform default priors](https://discourse.mc-stan.org/t/prior-predictive-check-in-distributional-mixed-model-including-uniform-default-priors/27527)

<div class="topic-metadata">

**Author:** [@Theresa\_U](https://discourse.mc-stan.org/u/Theresa_U)\
**Replies:** 1\
**Last updated:** [May 25, 2022, 1:44pm UTC](https://discourse.mc-stan.org/t/prior-predictive-check-in-distributional-mixed-model-including-uniform-default-priors/27527 "2022-05-25T13:44:24Z")

</div>

Hi, I am trying to do prior predictive checks to compare my own priors to the default priors in brms. I have a distributional model with random effects. Below you find a minimal example adapted from the brms manual (Est…

---

## [Use simulated or observed covariates in prior predictive checks?](https://discourse.mc-stan.org/t/use-simulated-or-observed-covariates-in-prior-predictive-checks/24277)

<div class="topic-metadata">

**Author:** [@dmuck](https://discourse.mc-stan.org/u/dmuck)\
**Replies:** 1\
**Last updated:** [September 12, 2021, 6:31pm UTC](https://discourse.mc-stan.org/t/use-simulated-or-observed-covariates-in-prior-predictive-checks/24277 "2021-09-12T18:31:23Z")

</div>

In a typical Bayesian workflow, is it recommended to simulate our covariates before generating the prior predictive distribution? Are there any potential problems with using our observed covariates to check our priors?

---

## [Generating random values from truncated Poisson?](https://discourse.mc-stan.org/t/generating-random-values-from-truncated-poisson/24036)

<div class="topic-metadata">

**Author:** [@James\_Keirstead](https://discourse.mc-stan.org/u/James_Keirstead)\
**Replies:** 1\
**Last updated:** [August 23, 2021, 1:32pm UTC](https://discourse.mc-stan.org/t/generating-random-values-from-truncated-poisson/24036 "2021-08-23T13:32:10Z")

</div>

As part of a prior predictive simulation, I would like to use Stan to generate values from a hurdle model, i.e. a Bernoulli trial to predict whether the outcome is 0 and a truncated Poisson for outcomes \>= 1. Does anyon…

---

## [Implementing prior predictive checks in stan](https://discourse.mc-stan.org/t/implementing-prior-predictive-checks-in-stan/23815)

<div class="topic-metadata">

**Author:** [@drstevok](https://discourse.mc-stan.org/u/drstevok)\
**Replies:** 7\
**Last updated:** [August 12, 2021, 8:37pm UTC](https://discourse.mc-stan.org/t/implementing-prior-predictive-checks-in-stan/23815 "2021-08-12T20:37:15Z")

</div>

I am trying to perform my prior predictive checks using Stan. The advice in the user guide suggests the following ‘complete’ program using the random number generators. The example provided is as follows: data { int\<l…

---

## [Prior predictive distribution as in posterior\_predict/epred](https://discourse.mc-stan.org/t/prior-predictive-distribution-as-in-posterior-predict-epred/20541)

<div class="topic-metadata">

**Author:** [@Angelo\_D\_Ambrosio](https://discourse.mc-stan.org/u/Angelo_D_Ambrosio)\
**Replies:** 4\
**Last updated:** [February 19, 2021, 4:19pm UTC](https://discourse.mc-stan.org/t/prior-predictive-distribution-as-in-posterior-predict-epred/20541 "2021-02-19T16:19:29Z")

</div>

Hello, Is there a way to have a prior predictive distribution with the same output structure as posterior\_predict/epred. I was only able to extract the parameters prior, not the output one. Thanks

---

## [Bayesian Priors](https://discourse.mc-stan.org/t/bayesian-priors/18420)

<div class="topic-metadata">

**Author:** [@Sham414](https://discourse.mc-stan.org/u/Sham414)\
**Replies:** 9\
**Last updated:** [October 23, 2020, 8:53pm UTC](https://discourse.mc-stan.org/t/bayesian-priors/18420 "2020-10-23T20:53:35Z")

</div>

Hi Stan Experts. I am new to Bayesian and brms. I am trying to run multivariate regression using Bayesian. I am working with 10M records at customer cross week level with sales as dependent variable and other different p…

---

## [Weird output for a very simple model with sample\_prior = "only"](https://discourse.mc-stan.org/t/weird-output-for-a-very-simple-model-with-sample-prior-only/18100)

<div class="topic-metadata">

**Author:** [@bnicenboim](https://discourse.mc-stan.org/u/bnicenboim)\
**Replies:** 16\
**Last updated:** [September 22, 2020, 1:24pm UTC](https://discourse.mc-stan.org/t/weird-output-for-a-very-simple-model-with-sample-prior-only/18100 "2020-09-22T13:24:54Z")

</div>

Hi, I’m fitting a model to generate prior predictive distributions, but they are not looking as expected. (I know that the priors are terrible, but that’s the whole point.) library(dplyr) library(brms) df\_spacebar\_empt…

---

## [Prior Predictive Checks with RStan](https://discourse.mc-stan.org/t/prior-predictive-checks-with-rstan/17254)

<div class="topic-metadata">

**Author:** [@lucialenasophie](https://discourse.mc-stan.org/u/lucialenasophie)\
**Replies:** 3\
**Last updated:** [August 12, 2020, 3:12pm UTC](https://discourse.mc-stan.org/t/prior-predictive-checks-with-rstan/17254 "2020-08-12T15:12:15Z")

</div>

Hi everybody, I would like to perform a prior predictive check for my Stan model in RStan, following https://mc-stan.org/docs/2\_24/stan-users-guide/prior-predictive-checks.html My Stan Code: data { int\<lower=0\> N; …

---

## [Discrepancy between nominal and realised prior predictive distributions](https://discourse.mc-stan.org/t/discrepancy-between-nominal-and-realised-prior-predictive-distributions/16145)

<div class="topic-metadata">

**Author:** [@famuvie](https://discourse.mc-stan.org/u/famuvie)\
**Replies:** 9\
**Last updated:** [July 1, 2020, 7:29am UTC](https://discourse.mc-stan.org/t/discrepancy-between-nominal-and-realised-prior-predictive-distributions/16145 "2020-07-01T07:29:46Z")

</div>

Dear all, I noticed a considerable discrepancy between nominal priors (intended priors, theoretical or generated with RNG) and the actually sampled priors. I understand how both methods can differ numerically, but what I…

---

## [Attempt to generate prior predictive samples from SIR model](https://discourse.mc-stan.org/t/attempt-to-generate-prior-predictive-samples-from-sir-model/15468)

<div class="topic-metadata">

**Author:** [@ziqing-ang](https://discourse.mc-stan.org/u/ziqing-ang)\
**Replies:** 6\
**Last updated:** [May 30, 2020, 8:12am UTC](https://discourse.mc-stan.org/t/attempt-to-generate-prior-predictive-samples-from-sir-model/15468 "2020-05-30T08:12:25Z")

</div>

I am trying to pick up PyStan for my research project involving ODE. I have found this very instructive paper: https://mc-stan.org/users/documentation/case-studies/boarding\_school\_case\_study.html#2\_using\_simulated\_data…
