Regression model (Section 9.2)
WinBUGS code Regression.doc
Posterior means, posterior standard deviations and 95% credible intervals (Inference->Samples->stats)
Sample path (history)
Posterior probability densities (Inference->Samples->density)
(Further, right-click on the figure->Margins-> Special…->Smooth -> change from 0.2 to 0.1-> apply all)
Sample autocorrelation function (Inference->Samples->auto corr)
Running quantile plot (Inference->Samples->quantiles)
Scatter plots (Inference->Correlations…)
Posterior predictive analysis. pleft:Pr(ypred[i] =< y[i]). pright: Pr(y.pred[i]>=y[i])
Inference-> Compare-> node:pleft and click on caterpillar)
(Further, right-click on the figure, Property…-> Margins -> Special…-> check “rank” and showbaseline:0.0
*P(ystar[26]<y[26])=0.005 < 0.05
Inference-> Compare-> node:pright and click on caterpillar)
(Further, right-click on the figure, Property…-> Margins -> Special…-> check “rank” and showbaseline:0.05)
*P(ystar[28]>y[28])=0.0002 < 0.05
*P(ystar[29]>y[29])=0.0190 < 0.05
*P(ystar[18]>y[18])=0.0358 < 0.05