Using the DoodleBUGS editor in WinBUGS to create a graphical model for the NB10 data 1. From the Doodle menu select New, and hit OK in the New Doodle window. You'll get an Untitled window in which the graphical model will be built. 2. Put the mouse arrow in the middle of the Untitled window, hold down the Ctrl key, and left click; this will create a plate that corresponds to the likelihood loop for the model. WinBUGS is waiting for you to fill in the (looping) index, for which you may as well type in the lower-case letter i; then left click on from: (to tell it the lower range of looping) and type 1; then left click on up to: (to tell it the upper range) and type n 3. Now position the mouse arrow in the middle of the plate and left click to create a stochastic node that corresponds to the data values: under name: you can type y[ i ] and then left click on density: -- this will create a pull-down menu of possible sampling distributions, from which you choose dt . Then left click on mean, use the backspace key to erase the 0.0, and type mu in its place; then left click on precision, erase the 1.0E-6 and type tau instead; and then finally left click on df, erase the 4 and type in nu (this completes the sampling model for the data vector y). 4. Somewhere outside the plate, e.g., somewhere to the left of it, left click to create a new stochastic node; name it mu and let everything else default to what's already there (this completes specifying the prior on mu as normal with mean 0 and precision 1.0E-6). 5. Somewhere else outside the plate, i.e., not overlapping with the mu node, left click to create another new stochastic node; name it tau , choose as its density dgamma , and let everything else default (this completes the prior specification on tau as Gamma( epsilon, epsilon ) with epsilon = 0.001). 6. Somewhere else outside the plate and not overlapping with mu or tau, left click to create one final new stochastic node; name it nu , choose as its density dunif , and type in 2.0 for the lower bound and 12.0 for the upper bound; this completes specifying the prior for nu as Uniform( 2.0, 12.0 ). 7. Left click on the y[ i ] node, and then hold the Ctrl key down and left click on the mu node; this will create a directed edge in the graph in which mu is the parent and y[ i ] is the child, signifying that y[ i ] is stochastically dependent on mu. Repeat for tau (i.e., hold the Ctrl key down and left click on the tau node) and for nu. This completes the model specification; you can use Save As from the File menu to save this model in the usual way, and you can now get a Specification Tool from the Model menu, select your Bayesian model window, and hit the Check Model button as usual to see if it is syntactically correct. 8. To generate the algebraic version of this model, make sure your graphical model window is selected, go back to the Doodle menu and select Write Code; this will create another Untitled window in which you'll see a model that's similar to some of the models we already fit to the NB10 data.