# Different horseshoe specifications

**URL:** <https://discourse.mc-stan.org/t/different-horseshoe-specifications/24795>\
**Category:** Modeling\
**Created:** [October 11, 2021, 9:55am UTC](https://discourse.mc-stan.org/t/different-horseshoe-specifications/24795 "2021-10-11T09:55:53Z")\
**Posts on this page:** 5\
**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:** [October 11, 2021, 9:55am UTC](https://discourse.mc-stan.org/t/different-horseshoe-specifications/24795/1 "2021-10-11T09:55:53Z")

</div>

Dear all,

In reading the literature on the horseshoe and also scanning the Stan forum, I’m coming across a couple of different specifications for the ordinary horseshoe (I know there is a Finnish version). For example, in Carvalho, Polson, and Scott (2009) we find

\beta\_{m} \sim \mathcal{N} (0, \tau \cdot \lambda\_{m})

\lambda\_{m} \sim \text{Half-}\mathcal{C} (0, 1)

\tau \sim \text{Half-}\mathcal{C} (0, 1).

but in Piironen and Vehtari (2017) we find that \tau and \lambda are both squared.

Then in this post ([Horseshoe prior in rstan](https://discourse.mc-stan.org/t/horseshoe-prior-in-rstan/14561)) the gentleman multiples \tau and \lambda by \sigma.

I’m interested in simply knowing the proper specification of the horseshoe prior. Right now, I’m using the Carvalho, Polson, and Scott (2009) which seems to work fine.

Thank you!

---

<div class="post-metadata">

**Author:** ![StaffanBetner](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/staffanbetner/32/11056_2.png) [@StaffanBetner](https://discourse.mc-stan.org/u/StaffanBetner)\
**Post date:** [October 11, 2021, 12:33pm UTC](https://discourse.mc-stan.org/t/different-horseshoe-specifications/24795/2 "2021-10-11T12:33:19Z")

</div>

@jpiironen @avehtari

---

<div class="post-metadata">

**Author:** ![avehtari](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/avehtari/32/5935_2.png) [@avehtari](https://discourse.mc-stan.org/u/avehtari)\
**Post date:** [October 11, 2021, 12:41pm UTC](https://discourse.mc-stan.org/t/different-horseshoe-specifications/24795/3 "2021-10-11T12:41:55Z")

</div>

There is no one single proper specification, and different versions can work similalrly or differently depending on the case. See some discussion in sections 3.2, 3.3 and 3.5, and appendices C.1 and C.2 in

> **[Sparsity information and regularization in the horseshoe and other shrinkage...](https://projecteuclid.org/journals/electronic-journal-of-statistics/volume-11/issue-2/Sparsity-information-and-regularization-in-the-horseshoe-and-other-shrinkage/10.1214/17-EJS1337SI.full)**
>
> The horseshoe prior has proven to be a noteworthy alternative for sparse Bayesian estimation, but has previously suffered from two problems. First, there has been no systematic way of specifying a prior for the global shrinkage hyperparameter based...

---

<div class="post-metadata">

**Author:** ![jpiironen](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/jpiironen/32/9626_2.png) [@jpiironen](https://discourse.mc-stan.org/u/jpiironen)\
**Post date:** [November 9, 2021, 9:55am UTC](https://discourse.mc-stan.org/t/different-horseshoe-specifications/24795/4 "2021-11-09T09:55:52Z")

</div>

Hi, this reply comes late, but I stumbled upon this just now.

> but in Piironen and Vehtari (2017) we find that \tau and \lambda are both squared.

If I understand what you mean, this should be just a matter of notation; so if you write N(\cdot, a), whether a refers to std or variance. I always used it to denote variance, and as far as I see also Carvalho et al. use that notation in their papers. Notice though that in those half-Cauchy distributions the second argument denotes scale (as Cauchy has no variance).

---

<div class="post-metadata">

**Author:** ![avehtari](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/avehtari/32/5935_2.png) [@avehtari](https://discourse.mc-stan.org/u/avehtari)\
**Post date:** [November 10, 2021, 8:56am UTC](https://discourse.mc-stan.org/t/different-horseshoe-specifications/24795/5 "2021-11-10T08:56:07Z")

</div>

> [@jpiironen](#):
>
> so if you write N(\cdot, a), whether a refers to std or variance.

In other material, we have tried to make the distinction more clear by using \mathrm{normal}(\cdot, \sigma) when \sigma is in sd scale, which then matches the parameterization of `normal()` in Stan. Using sd scale has benefits when thinking about priors in general (that don’t need be conjugate).
