I am having some trouble with the step() - function; when I try to
condition the result of a step-function in the data statement I get a
"multiple definition of node" - error. The code below is a very simple
piece which generates the error.
MODEL:
======
model{
p ~ dunif(0,1);
x ~ dbin(10,p);
y <- step(x-5);
}
DATA:
=====
list(y=1);
What I want to do in this small example is to find the a posteriori
distribution of the p parameter when I observe the result of a binomial to
be at least 5, say.
Any help on why this is not working, how to rephrase, etc. is highly
appreciated.
hl
---------------------------------------------------------------
Helge Langseth
SINTEF Industrial Management
WWW-info: http://www.sintef.no/sipaa/personal/hlangset.html
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|