# Brms - sampling from a point estimate via fixed\_param not possible?

**URL:** https://discourse.mc-stan.org/t/brms-sampling-from-a-point-estimate-via-fixed-param-not-possible/17130
**Category:** brms
**Created:** [July 31, 2020, 12:18pm UTC](https://discourse.mc-stan.org/t/brms-sampling-from-a-point-estimate-via-fixed-param-not-possible/17130 "2020-07-31T12:18:35Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![wds15](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/wds15/32/908_2.png) [@wds15](https://discourse.mc-stan.org/u/wds15)
#### Post date: [July 31, 2020, 12:18pm UTC](https://discourse.mc-stan.org/t/brms-sampling-from-a-point-estimate-via-fixed-param-not-possible/17130/1 "2020-07-31T12:18:35Z")

</div>

Hi!

I would like to sample my model from a point prior. At the moment I have my hand-crafted R code for this, but I thought why not to use brms to do that.

I figured, that I could simply use the “Fixed\_Param” thing from Stan. So I would setup my model in brms once, setup the design and then only sample a set of parameters for which I would call brm to then actually sample the data according to the design and the model.

… but brm does not let me choose the “Fixed\_Param” thing from Stan - it’s not allowed. Why not? To me this looks very useful - or is there another way of doing what I have outlined?

I know that there is the constant prior in more recent brms versions… but for one, I am cannot easily bump the version nor would I like to recompile the model just for that.

Suggestions? Maybe there is a way via make\_stancode… but if so, how would I turn things again into a brms object where I get the nice post processing?

Thanks!

Sebastian

---

<div class="post-metadata">

### Author: ![paul.buerkner](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/paul.buerkner/32/3303_2.png) [@paul.buerkner](https://discourse.mc-stan.org/u/paul.buerkner)
#### Post date: [July 31, 2020, 3:38pm UTC](https://discourse.mc-stan.org/t/brms-sampling-from-a-point-estimate-via-fixed-param-not-possible/17130/2 "2020-07-31T15:38:13Z")

</div>

Is there something specific that I need to take care of when allowing fixed\_param in brms?

In other words do you have some example code for me how you otherwise do it manually for a simple model?

---

<div class="post-metadata">

### Author: ![wds15](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/wds15/32/908_2.png) [@wds15](https://discourse.mc-stan.org/u/wds15)
#### Post date: [July 31, 2020, 3:41pm UTC](https://discourse.mc-stan.org/t/brms-sampling-from-a-point-estimate-via-fixed-param-not-possible/17130/3 "2020-07-31T15:41:29Z")

</div>

I don’t think so that you need to do anything special in brms for fixed\_param… which is why I thought this should just work. The only thing which the user then should do is to provide a sensible “init” which gets used.

I can code up a simple example… should I file an issue for that?

---

<div class="post-metadata">

### Author: ![paul.buerkner](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/paul.buerkner/32/3303_2.png) [@paul.buerkner](https://discourse.mc-stan.org/u/paul.buerkner)
#### Post date: [July 31, 2020, 4:43pm UTC](https://discourse.mc-stan.org/t/brms-sampling-from-a-point-estimate-via-fixed-param-not-possible/17130/4 "2020-07-31T16:43:38Z")

</div>

Yes, filing an issue would be a good reminder for me.
