model{
for(i in 1:n)
{y~dt(0,p,omega)
p<-exp(-theta)
}
theta[1]~dnorm(mu,itau2)
for(j in 2:n)
{theta[j]~dnorm(theta2[j],itau2)
theta2[j]<-mu+phi*(theta[j-1]-mu)}
phi1~dbeta(20,1.5)
phi<-2*phi1-1
tau<-sqrt(1/itau2)
mu~dnorm(0,0.01)
itau2~dgamma(2.5,0.025)
omega~dchisqr(8)
}
list(phi1=0.975,mu=0,itau2=50,omega=8)
list(y=c(4.146,43.797,-35.144,-11.336,144.328,70.197,14.314,-50.908,3.474,
48.626,-43.837,1.676,2.513,-5.266,50.634,71.453,-2.957,22.925,55.909,
36.554,30.71,-112.438,71.431,-51.172,-140.776,4.057,-41,0,-67.784,1.809,
-85.73,-21.67,60.509,-60.997,-39.2,9.539,13.559,-53.612,83.841,-76.357,
27.067,-4.649,-44.394,25.778,-71.605,39.803,-72.453,51.154,-21.715,90.985,
-129.099,5.33,-63.898,24.787,-27.032,45.179,-38.694,143.693,51.6,1.222,-17.495,
34.349,-13.554,-51.822,89.387,-96.514,10.811,10.554,-11.168,-40.603,4.191,-27.891,
106.577,-67.601,39.683,-45.84,-15.903,54.383,-89.855,-36.467,33.743,-53.396,
-37.173,-18.263,-43.037,24.866,39.557,-69.958,53.077,-5.132,-21.685,-22.235,
57.308,80.825,-32.177,45.316,-2.602,5.574,102.995,87.375,1.822,-18.604,27.225,
28.603,-74.222,-45.951,-77.345,6.17,-28.538,-46.129,9.814,-13.917,33.144,-67.022,
20.316,-76.115,-54.725,4.666,-70.48,244.972,2.85,-24.557,8.068,52.718,-5.679,
-17.181,51.946,15.495,21.603,-7.85,52.26,8.541,-10.617,2.564,34.119,-69.948,41.076,
-4.515,21.215,24.086,23.422,-34.12,-23.625,-20.87,-1.955,63.099,-13.366,6.442,
59.848,-60.456,7.167,28.012,-3.876,-1.211,-35.562,-67.343,-35.071,-0.491,-13.399,
18.189,-54.913,31.68,49.598,12.606,30.409,-17.574,49.35,-24.218,12.786,123.119,
-28.287,-11.458,30.846,-22.282,5.786,49.166,1.799,-45.905,11.315,14.787,-1.922,
-32.856,22.277,85.992,5.484,5.481,67.433,4.377,4.848,15.592,-22.214,-19.774,-4.505,
-116.407,-44.727,10.599,-29.536,18.214,-84.595,-32.381,27.275,19.437,35.617,-22.276,
20.341,17.161,32.067,-86.43,40.104,50.778,-14.447,25.029,0.721,24.245,-3.717,-36.042,
24.643,1.681,44.556,15.405,17.049,17.376,11.884,-16.404,-3.927,1.785,11.06,-46.941,
-34.452,34.572,-2.986,-8.963,-3.587,6.098,26.739,36.294),n=236)