A user completely new to Stan here. I am trying to address the following problem using Stan: I have a vector of normally distributed estimates \hat\beta_i=\mathcal{N}(\mu_i,\sigma_i^2) for i = 1,...,D from different regression models.

I want to apply the horseshoe prior (or some other shrinkage prior) to those estimates such that

\beta_i | \lambda_i,\tau \sim \mathcal{N}(0,\tau^2\lambda_i^2)

\lambda_i \sim \mathcal{C}^+(0,1), \ \ i = 1,...,D

All of the examples I could find deal with estimating the regression model from individual level data using Stan, which is infeasible in my case, I have to impose the prior after estimating the coefficients. The coefficients come from an existing analysis pipeline on large-scale GWAS data, examining effects of multiple exposures on multiple outcomes.

I would appreciate some guidance on how to specify the Stan code to estimate the posterior \beta_i coefficients using a shrinkage prior.

Toy data for D=4 would be:

```
mu = c(0.1, 0.1, 1, 0.1)
sigma = c(0.1, 0.1, 0.1, 0.1)
```

where hopefully three estimates will be shrunk to near 0 and the estimate of 1 stays at 1. If the prior were a normal distribution, the simple solution would be to use inverse-variance weighing.

Thanks for the help!