View source: R/dist_horseshoe.R
| dist_horseshoe | R Documentation |
The horseshoe distribution (Carvalho et al., 2008) is a heavy-tailed continuous distribution defined as a scale mixture of normals. It is primarily used as a shrinkage prior in sparse Bayesian regression, where it concentrates mass near zero while retaining heavy tails that leave large signals unshrunk.
dist_horseshoe(lambda, tau)
lambda |
A positive numeric vector of local scale parameters
|
tau |
A positive scalar global scale parameter |
We recommend reading this documentation on pkgdown which renders math nicely. https://pkg.mitchelloharawild.com/distributional/reference/dist_horseshoe.html
In the following, let X be a horseshoe random variable with local
scale parameter lambda = \lambda > 0 and global scale parameter
tau = \tau > 0.
Support: x \in \mathbb{R}, the set of all real numbers.
Mean: E(X) — not available in closed form.
Variance: \mathrm{Var}(X) — not available in closed form.
Probability density function (p.d.f):
The horseshoe density does not have a simple closed form but can be expressed as a scale mixture:
X \mid \lambda, \tau \sim \mathcal{N}(0,\, \lambda^2 \tau^2)
where the half-Cauchy hyperprior \lambda \sim C^+(0, 1) induces the
characteristic horseshoe shrinkage behaviour.
Carvalho, C.M., Polson, N.G., and Scott, J.G. (2008). "The Horseshoe Estimator for Sparse Signals". Discussion Paper 2008-31. Duke University Department of Statistical Science.
Carvalho, C.M., Polson, N.G., and Scott, J.G. (2009). "Handling Sparsity via the Horseshoe". Journal of Machine Learning Research, 5, p. 73–80.
LaplacesDemon::dhs(), LaplacesDemon::rhs()
dist <- dist_horseshoe(lambda = c(0.5, 1, 2), tau = 1)
dist
support(dist)
generate(dist, 10)
density(dist, 0)
density(dist, 0, log = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.