When I'm using jags to do Bayesian modeling, I'm trying to set correlational prior distribution for two parameters that should only take values between 0 and 1. I want to use correlational priors due to theoretical reason, because I expect these two parameters to be correlated in my question setting. I found that without the 0-1 constraint, I can easily use multivariate normal distribution to set correlational priors, such as follows.
mu_prior_mean <- c(0, 0)
mu_prior_sd <- c(5, 5)
mu_prior_corr <- 0.8
mu_prior_cov <- matrix(c(mu_prior_sd[1] ^ 2,
mu_prior_corr * mu_prior_sd[1] * mu_prior_sd[2],
mu_prior_corr * mu_prior_sd[1] * mu_prior_sd[2],
mu_prior_sd[2] ^ 2), nrow = 2)
mu[1:2] ~ dmnorm.vcov(mu_prior_mean[1:2],mu_prior_cov[1:2, 1:2])
However, this won't be able to constrain the parameters mu to be between 0 and 1. What I have tried:
- The function I(.) does not work on the parameter vector.
- Use logit transformation
logit(mu[1:2]) ~ dmnorm.vcov(mu_prior_mean[1:2],mu_prior_cov[1:2, 1:2])
But a prior distribution simulation shows that mu1 and mu2 are not correlated, after the logit transformation.
Is there a way that I can set correlational beta priors on my parameter vector mu[1:2]?
Thanks for your time.