The main purpose of the automated MCMC algorithm is to provide the user with the opportunity to obtain a good approximation of the posterior distribution without initializing the MCMC algorithm: initial values, proposal distributions, burnin, and number of samples.
The automated MCMC algorithm has two phases: tuning and sampling. The tuning phase has two main concerns: the choice of a good proposal distribution and the search for the stationary region of the posterior distribution. In the sampling phase, the algorithm decides how many samples are necessary to obtain good approximations of the posterior mean and some quantiles of interest.
During the tuning phase, the algorithm tries to search for a good proposal distribution and, at the same time, to reach the stationary region of the posterior. The choice of the proposal distribution is based on the analysis of the acceptance rates. This is similar to what is done in PROC MCMC; for more information, see Chapter 61: The MCMC Procedure in SAS/STAT 13.2 User's Guide. For the stationarity analysis, the main idea is to run two tests, Geweke (Ge) and HeidlebergerWelch (HW), on the posterior chains at the end of each attempt. For more information, see Chapter 7: Introduction to Bayesian Analysis Procedures in SAS/STAT 13.2 User's Guide. If the stationarity hypothesis is rejected, then the number of tuning samples is increased and the tests are repeated in the next attempt. After 10 attempts, the tuning phase ends regardless of the results. The tuning parameters for the first attempt are fixed:
For the remaining attempts, the tuning parameters are adjusted dynamically. More specifically, each parameter is assigned an acceptance ratio (AR) of the stationarity hypothesis,
for . Then, an overall stationarity average (SA) for all parameters ratios is evaluated,
and the number of tuning samples is updated accordingly:
The HeidelbergerWelch test also provides an indication of how much burnin should be used. The algorithm requires this burnin to be . If that is not the case, the burnin is updated accordingly, , and a new tuning attempt is made. This choice is motivated by the fact that the burnin must be discarded in order to reach the stationary region of the posterior distribution.
The number of samples that the RafteryLewis nmc(RL) diagnostic tool predicts is also considered: . For more information, see Chapter 7: Introduction to Bayesian Analysis Procedures in SAS/STAT 13.2 User's Guide. However, in order to exit the tuning phase, is not required.
The main purpose of the sampling phase is to make sure that the mean and a quantile of interest are evaluated accurately. This can be tested by implementing the HeidelbergerWelch halfwidth test and by using the RafteryLewis diagnostic tool. In addition, the requirements that are defined in the tuning phase are also checked: the Geweke and HeidelbergerWelch tests must not reject the stationary hypothesis, and the burnin that the HeidelbergerWelch test predicts must be zero.
The sampling phase has a maximum of 10 attempts. If the algorithm exceeds this limit, the sampling phase ends and indications of how to improve sampling are given. The sampling phase first updates the burnin with the information provided by the HeidelbergerWelch test: . Then, it determines the difference between the actual number of samples and the number of samples that are predicted by the RafteryLewis test: . The new number of samples is updated accordingly:
Finally, the HeidelbergerWelch halfwidth test checks whether the sample mean is accurate. If the mean of any parameters is not considered to be accurate, the number of samples is increased:
Table 11.4 through Table 11.9 show all the distribution density functions that PROC COUNTREG recognizes. You specify these distribution densities in the PRIOR statement.
Table 11.5: Gamma Distribution
PRIOR statement 
GAMMA(SHAPE=a, SCALE=b ) 
Density 

Parameter restriction 

Range 

Mean 

Variance 

Mode 

Defaults 
SHAPE=SCALE=1 
Table 11.6: Inverse Gamma Distribution
PRIOR statement 
IGAMMA(SHAPE=a, SCALE=b) 
Density 

Parameter restriction 

Range 

Mean 

Variance 

Mode 

Defaults 
SHAPE=2.000001, SCALE=1 
Table 11.7: Normal Distribution
PRIOR statement 
NORMAL(MEAN=, VAR=) 
Density 

Parameter restriction 

Range 

Mean 

Variance 

Mode 

Defaults 
MEAN=0, VAR=1000000 
Table 11.8: t Distribution
PRIOR statement 
T(LOCATION=, DF=) 
Density 

Parameter restriction 

Range 

Mean 

Variance 

Mode 

Defaults 
LOCATION=0, DF=3 
Table 11.9: Uniform Distribution
PRIOR statement 
UNIFORM(MIN=m, MAX=M) 
Density 

Parameter restriction 

Range 

Mean 

Variance 

Mode 
Not unique 
Defaults 
MIN, MAX 