Dear winbugs users
I am working on a stotastic volality model. while I am
trying to compile the program, there is an error,
i.e."arrays index is less than one". I want to know
how to solve the problem.
Please see below the code.
model
{ for (t in 1:n)
{ y[t]~dnorm(0,tau[t])
tau[t]<-exp(theta[t])
}
theta[1]~dnorm(mutheta[1],tau[0])
mutheta[1]<-mu+phi*theta[0]
theta[0]~dnorm(0,tau[0])
for (t in 2:n)
{ theta[t]~dnorm(mutheta[t],tau[0])
mutheta[t]<-mu+phi*theta[t-1]
}
}
phi~dnorm(1,1) I (-1,1)
mu~dnorm(1,1)
tau[0]<-1/itau[0]
itau[0]~dgamma(1,1)
# data
list( y=c(1,2,3,4,5,6,7,8,9,10),n=10)
Many thanks,
Zhu Huiming
Depart of stat., Hunan university, China
E-Mail: [log in to unmask]
__________________________________________________
¸Ï¿ì×¢²áÑÅ»¢³¬´óÈÝÁ¿Ãâ·ÑÓÊÏä?
http://cn.mail.yahoo.com
-------------------------------------------------------------------
This list is for discussion of modelling issues and the BUGS software.
For help with crashes and error messages, first mail [log in to unmask]
To mail the BUGS list, mail to [log in to unmask]
Before mailing, please check the archive at www.jiscmail.ac.uk/lists/bugs.html
Please do not mail attachments to the list.
To leave the BUGS list, send LEAVE BUGS to [log in to unmask]
If this fails, mail [log in to unmask], NOT the whole list
|