Dear all:
I am a new user of WinBugs.
Questions 1:
How do I descibe a prior which is a mixture of Normal and a point mass at
0? I saw examples describing a mixture of two normals in Bugs manual. But,
my question:
say,
-----------------------------------
y|z=1 ~ N(0,1)
y|z=0 is a point mass at 0, i.e. (y|z=0) = 0
z~Bernoulli(p)
-------------------------------------
for example, given observed y, I want to estimate p,
How do I write it in WinBugs code?
Question 2:
I have a simple code below as part of longer program:
------------------------------------------
model{
for (j in (L+1):(JN-1)) {
tempint2[j] <- pow(2, j) - 1
for (k in 0:tempint2[j]) {
i <- pow(2, j)+1+k
theta[i] ~ dnorm(0, tau)
w[i] ~ dnorm (theta[i], tau0)
}
}
}
list(L=0, JN=5)
-----------------------------------------
why the compiler keeps saying that:
"variable tempint2 is not defined"
How can I make it working?
Thanks!
Leming Qu
Department of Mathematics
Boise State University
-------------------------------------------------------------------
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
|