# Constrain parameter to be negative

**URL:** <https://discourse.mc-stan.org/t/constrain-parameter-to-be-negative/11093>\
**Category:** brms\
**Created:** [September 23, 2019, 3:01pm UTC](https://discourse.mc-stan.org/t/constrain-parameter-to-be-negative/11093 "2019-09-23T15:01:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kyle](https://avatars.discourse-cdn.com/v4/letter/k/848f3c/32.png) [@kyle](https://discourse.mc-stan.org/u/kyle)\
**Post date:** [September 23, 2019, 3:01pm UTC](https://discourse.mc-stan.org/t/constrain-parameter-to-be-negative/11093/1 "2019-09-23T15:01:45Z")

</div>

Aside from using a bound on a fixed effect parameter (i.e ub=0), is there a relatively simple way of constraining a parameter to be negative in brms (maybe something analogous to a lognormal prior for a parameter that is known to be positive)? Or is there a way to put a prior on the negated parameter? It’s only one parameter in my model, so I’m trying to avoid using the somewhat convoluted solution shown in [issue 86](https://github.com/paul-buerkner/brms/issues/86).

---

<div class="post-metadata">

**Author:** ![bbbales2](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/bbbales2/32/77_2.png) [@bbbales2](https://discourse.mc-stan.org/u/bbbales2)\
**Post date:** [September 24, 2019, 7:40pm UTC](https://discourse.mc-stan.org/t/constrain-parameter-to-be-negative/11093/2 "2019-09-24T19:40:39Z")

</div>

Not sure about the answer to your original question, but could you make it positive and then multiply the corresponding covariates by -1?

---

<div class="post-metadata">

**Author:** ![kyle](https://avatars.discourse-cdn.com/v4/letter/k/848f3c/32.png) [@kyle](https://discourse.mc-stan.org/u/kyle)\
**Post date:** [September 26, 2019, 7:20pm UTC](https://discourse.mc-stan.org/t/constrain-parameter-to-be-negative/11093/3 "2019-09-26T19:20:12Z")

</div>

Thanks, @bbbales2. That’s certainly one possible workaround.
