model{
for(i in 1:n){
y[i]~dnorm(0,p[i])
p[i]<-exp(-h[i])
}
h[1]~dnorm(muh,qh)
muh<-alpha/(1-rho)
qh<-pv*(1-rho*rho)
for(j in 2:n){
h[j]~dnorm(mu2[j],pv)
mu2[j]<-alpha+rho*h[j-1]}
alpha~dnorm(0,0.0001)
pv~dgamma(1.0E-3,1.0E-3)
rho=dunif(-0.999,0.999)}
