大家能不能帮忙看看这个程序哪儿出错了
model{
for ( t in 1:n){
y[t]~dnorm(a,p)
x[t]~dnorm(mu[t],q)
mu[t]<-y[t]*x[t-1]
}
#priors for the regression parameters
x[0]~dnorm(0,q)
#prior for the precision parameters
p~dgamma(1.0E-3,1.0E-3)
q~dgamma(1.0E-3,1.0E-3)
#monitor the standard deviation
sigma<-1/sqrt(p)
}
#data
list(n=10, x[0]=-0.4326,x=c(-0.7999 0.6591 -2.8224 -0.0439 0.9578 0.3502 0.7981 -0.1675 0.4817 0.3526),y=c(1.1145 1.0077 2.1924 1.0913 -0.1436 0.8803 -0.5091 0.4805 0.4518 0.5000))
#initials values
list(a=0,p=0,q=0)
是关于双重时间序列模型的模拟