model{
for(i in 1:n){for(tt in 1:time){
y[tt,i]~dnorm(mu[tt,i],tau)
mu[tt,i]<-beta*X[tt,i]+alpha[i]}}
for(i in 1:n){alpha[i]~dnorm(alphabar,phi)}
alphabar~dnorm(0,0.0001)
beta~dnorm(0,0.0001)
tau~dgamma(0.01,0.01)
phi~dgamma(0.01,0.01)
}

