# Vignette on generating data with brms

**URL:** <https://discourse.mc-stan.org/t/vignette-on-generating-data-with-brms/27281>\
**Category:** Modeling\
**Tags:** brms\
**Created:** [April 27, 2022, 6:33pm UTC](https://discourse.mc-stan.org/t/vignette-on-generating-data-with-brms/27281 "2022-04-27T18:33:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dkaplan](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/dkaplan/32/13835_2.png) [@dkaplan](https://discourse.mc-stan.org/u/dkaplan)\
**Post date:** [April 27, 2022, 6:33pm UTC](https://discourse.mc-stan.org/t/vignette-on-generating-data-with-brms/27281/1 "2022-04-27T18:33:39Z")

</div>

Hi all,

I’m interested in exploring prior sensitivity by generating simulated data according to a model and then having a way to check the sensitivity by looking at parameter recovery, intervals, and (if possible) differences in loo values resulting from the simulation. I understand this can be done in brms but I am unable to find a clear vignette on the topic. If there is one out there please send me the link.

Thanks in advance,

David

---

<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:** [April 27, 2022, 9:03pm UTC](https://discourse.mc-stan.org/t/vignette-on-generating-data-with-brms/27281/2 "2022-04-27T21:03:04Z")

</div>

This isn’t exactly what you’re asking for, but I’ve blogged on how to do simulation-based power analyses with **brms** models, which could get you started. To adjust for your needs, you’d change the evaluation criteria from power to CI width, parameter bias, and so on. You can find the first post in the blog series [here](https://solomonkurz.netlify.app/post/bayesian-power-analysis-part-i/).

---

<div class="post-metadata">

**Author:** ![dkaplan](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/dkaplan/32/13835_2.png) [@dkaplan](https://discourse.mc-stan.org/u/dkaplan)\
**Post date:** [April 27, 2022, 11:18pm UTC](https://discourse.mc-stan.org/t/vignette-on-generating-data-with-brms/27281/3 "2022-04-27T23:18:17Z")

</div>

I think this will do the trick. Thanks.

---

<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:** [April 28, 2022, 12:57am UTC](https://discourse.mc-stan.org/t/vignette-on-generating-data-with-brms/27281/4 "2022-04-28T00:57:41Z")

</div>

Cheers!
