Link to home

Case Study #3

PROC MCMC and non-informative priors

proc mcmc data=ONFIT seed=27500 nbi=5000 ntu=5000 nmc=200000
thin=10;
parms beta0 beta1 beta2 beta3;       *-using “beta” for the parameters, not
“theta”;
prior beta: ~ normal(0, var=10000);  *-all the parameters have noninformative
priors;
p=logistic(beta0+beta1*CDD+beta2*RAIN+beta3*WW); *-inverse link function
model ONFIT ~ binomial(N,p);
title "Bayesian Analysis using MCMC - non informative priors";
run;

“Estimates” (means of the posteriors), the posterior percentiles and HPD limits are provided in Table 2. Readers can see that values are very close to the ones generated with the GENMOD procedure.


Table 2. The means of the posteriors and their corresponding 95% credible intervals (analogous to a confidence interval with frequentist analysis) for parameters in case study #3. Click to enlarge.

Suggested exercises after completing case study #3:

(a) Run MCMC with and without THINNING and compare results (SAS file is provided). The mixing of the MCMC chain and the autocorrelation plots give a good indication about the effect of THINNING.

(b) Compare plots/results generated by case #1 and case #3. What are the similarities and the differences?

Similarly, re-do case study #2 using PROC MCMC instead of PROC GENMOD. The code is given below.