model
{
y ~ dbin(p, n)
p ~ dbeta(alpha, beta)
}
data list(y = 8, n = 145, alpha = .5, beta = .5)
inits list(p = .5)
To load the model, highlight
the word "model" and then click "check model" in the Specification Tool
from the Model menu. To load the data, highlight the word "list"
beginning the data and then click "load data" on the Specification
Tool from the Model menu. Then compile using the Specification Tool.
Then highlight the word "list" beginning the list of initial values
for parameters and click "load inits" on the Specification Tool.
To run, use Inference -> Samples to bring up the Sample Monitor Tool. Type p in the node menu and then click set, to specify that we want to monitor the node p for the default of 1000000 iterations (this many iterations would be overkill for this simple model!). Bring up the Update tool from the Model -> update menu. Click "update" to run the default of 1000 iterations.
Now p has been monitored for these 1000 iterations and the values and various statistics about these values are available from the Sample Monitor Tool.