'Openbugs multiple definitions of node

I am new to Openbugs and I am getting this error when I compile the code. It appears the error is because of the line (z[i] <- h). I need to keep stochastic dependence on h which is uniformally distributed in the first line of the model. Any help in this regard is highly appreciated.

model{

h ~ dunif(2,21000)

mu ~ dunif(0.75,1.5)

sigma ~ dunif(0.07,0.25)

tau <- 1/pow(sigma,2)

for (i in 1:5) {

z[i] <- h

z[i] ~ dnorm(mu, tau)

}

}

data list(Q=c(75,85,100,100,100))



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source