title: Cauchy prior in JAGS
body: <p>I'm building a multi-level Bayesian model using rJAGS and I would like to specify a Cauchy prior for several of my parameters.  Is there a way to do this in JAGS, or do I need to switch to STAN?  My JAGS model is below.  I'd like to replace the <code>dnorm</code> distributions with Cauchy, but JAGS cannot find the standard <code>R</code> Cauchy distributions, e.g. <code>dcauchy</code>, <code>pcauchy</code></p>
  
  <pre><code>model_string &lt;- "model{
  for (i in 1:n){
      y[i] ~ dbin(mu[i], 1) 
  p.bound[i] &lt;- max(0, min(1, mu[i])) #381 gelman
  logit(mu[i]) &lt;- a[dc[i]] + b1*x1[i] + b2*x2[i]
  }
  
  b1 ~ dnorm(0,.001) 
  b2 ~ dnorm(0,.001) 
  
  for (j in 1: n.dc ){
      a[j] ~ dnorm(g0, tau.a)  #not goj, g1j
  }
  
  g0 ~ dnorm(0,.001) 
  tau.a &lt;- pow(sigma.a , -2)
  sigma.a ~ dnorm(0,.001) 
  }"
  </code></pre>