2.5.2 Bayesian Estimation using WinBUGS or OpenBUGS

For a appropriate analysis of Bayesian inference of the model generated make the following.

1. Open the files with the syntax of the model and of the data previously generated by the BayesianModeling in WinBUGS or OpenBUGS.

2. Having activated the window of Skew Probit 2SP Model. txt, click Model > Specification

3. This will open the dialogue box Specification Tool.

4. Select the model, highlighting the word model and click check model. In the left corner below has to appear model is syntactically correct that indicates that the syntax of the model has been properly formulated

5. Select in the Skew Probit 2SP Model.txt file, the line under data and do click load data. In the left corner below appears data loaded indicating that the data have been loaded.

6. In the data file select the list of the variables that are placed in the first row and click load data.

7. In the dialogue box Specification tool indicate the number of chains that want to generate in the text box num of chains. Once specified the number of chains to generate (in this example 1 chain) do click compile.

In the left corner below has to appear model compiled.

8. Select the line under Inits in the file of the model and click load inits. Then click gen inits. This generates the initial values for the Bayesian estimation. In the left corner below has to appears initial values generated, model initialized

9. Click Model > Update

10. This will open the dialogue box Update tool. In the text box updates enter the number of iterations that requires and then click update.

While the program does the iterations, in the left corner below will appear the following message model is updating until the iterations finish when the following message 4000 updates took 61 s appears.

11. Then should specify that parameters need the program save, for this go to Inference > Samples, which will open the dialogue box Sample monitor tool. In the text box node type the name of the parameter and then click set; this has to be done for each parameter.

12. Repeat the step 10 generating more iterations that now have being saved by the WinBUGS or OpenBugs. In the dialogue box Sample Monitor Tool, can calculate posteriori statistics of the parameters clicking stats, a historical of the chains clicking history, an estimation of the posteriori density and others statistics of the chains can be calculated using this dialogue box.