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 dnorm
distributions with Cauchy, but JAGS cannot find the standard R
Cauchy distributions, e.g. dcauchy
, pcauchy
model_string <- "model{
for (i in 1:n){
y[i] ~ dbin(mu[i], 1)
p.bound[i] <- max(0, min(1, mu[i])) #381 gelman
logit(mu[i]) <- 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 <- pow(sigma.a , -2)
sigma.a ~ dnorm(0,.001)
}"