Dear WinBUGS users,
I am try to look at a Markov Model, which could be simplified to as much
as :
model;
{
for( i in 1 : T ) {
A[i] ~ dbin(prob,Y[i])
lam[i] <- a * Y[i] + b
B[i] ~ dpois(lam[i])
Y[i + 1] <- A[i] + B[i]
}
}
for A and B both functions of Y(i).
The problem is that my Y is then both my data and a logical node.
I understand that you can have data input into a stochastic node, but not
for a logical node.
I got round this temporally by adding :
Count[i] <- A[i] + B[i]
Y[i+1] ~ dpois(Count[i])
but in the long run this is not suitable I don't think.
Can anyone think of a bit way around this. I'm sure this is a very simple
problem, but I can't get my head round it.
Many thanks !
David
-------------------------------------------------------------------
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
|