The WinBUGS model uses a finite truncation of the reciprocal prior. The numbered lines have the following roles:
- Line (1) forms , the normalized prior probability vector on the integer labels . The deterministic sum may be declared after its use because the model is declarative.
- Line (2) assigns that categorical distribution. The following observation model treats the supplied value as observed data, rather than as an unknown parameter.
- Line (3) forms observation probabilities for and zero for . For integer , the small positive offset in
step(N-j+0.01)includes the endpoint without depending on the convention at zero. There are exactly nonzero entries, so this vector sums to one.
Combining that categorical distribution observation likelihood with the truncated reciprocal prior producesThe Markov chain Monte Carlo output approximates this posterior. The actual PDF separates the observation line from the preceding comment; it must remain an active stochastic statement.
Articles by others on the same topic
There are currently no matching articles.