I'd like to set up half-Cauchy prior for rjags parallel fit. The prior is set in the model as:
model <- function(){
...
# rho.b ~ dunif(-0.99, 0.99)
tau_h ~ dt(0, 1, 1)T(0,)
tau_b ~ dt(0, 1, 1)T(0,)
precision_h <- 1/(pow(tau_h,2))
precision_b <- 1/(pow(tau_b,2))
rho.h ~ dnorm(0, precision_h)
rho.b ~ dnorm(0, precision_b)
...
}
params <- c("lambda.adj","lambda.1","L.0","L.1","b.adj","b1","beta.adj","beta.0","rho.b","rho.h","sigma.hzd","sigma.b")
cl <- makePSOCKcluster(3)
tmp <- clusterEvalQ(cl, library(dclone))
parLoadModule(cl, 'glm')
parLoadModule(cl, 'lecuyer')
parLoadModule(cl, 'dic')
model.t1 <- jags.parfit(cl = cl, data = data, params = params, model = model,
n.chains = 3,
n.update = 10000,
n.iter = 7000,
thin = 1)
I received the error message saying:
Error: unexpected symbol in: " # rho.b ~ dunif(-0.99, 0.99) tau_h ~ dt(0, 1, 1)T"
The same error happened when I set
tau_h ~ dt(0, 1, 1) T(0,)
How can I set up the half-Cauchy prior in this case?