The Sample Monitor Tool allows WinBUGS to store every value it simulates for that parameter. This will enable us to view trace plots of the samples to check convergence and to obtain posterior quantiles for a parameter (Fig. 9.6). Parameters were set in the model statement below:

#quantities of interest to monitor
params[1]<-alpha
params[2]<-beta1
params[3]<-beta2
params[4]<-beta3
params[5]<-beta4
params[6]<-beta5
params[10]<-lambda

Figure 9.6

Figure 9.6: Setting the sample monitor tool and initiating program to run in WinBUGS