In one experiment, participants can use a combination of strategy X and Y to solve problems. θ is the weight of X (ranging from 0 to 1, distributed as Beta), which can somehow be inferred from human data (perhaps no need to go into details here).
In a paper (p. 117)1 that I read, the authors reparameterized the Beta distribution of θ by its mean and standard deviation. How can I implement this in JAGS? Below is my attempt and I'm not sure if it's correct. If not, I wish to know what I should do instead.
model{
for (i in 1:n) { # for each person
theta[i] ~ dbeta(alpha, beta) # theta values come from data
}
alpha <- mu * phi
beta <- (1-mu) * phi
phi ~ dgamma(.1,.1)
mu ~ dunif(0,1)
}
Thanks in advance and please let me know if there's any detail that I should add!