SAS/STAT Software

MCMC Procedure

The MCMC procedure is a general purpose Markov chain Monte Carlo (MCMC) simulation procedure that is designed to fit a wide range of Bayesian models. PROC MCMC procedure enables you to do the following:

  • specify a likelihood function for the data, prior distributions for the parameters, and hyperprior distributions if you are fitting hierarchical models
  • obtain samples from the corresponding posterior distributions, produces summary and diagnostic statistics, and save the posterior samples in an output data set that can be used for further analysis
  • analyze data that have any likelihood, prior, or hyperprior as long as these functions are programmable using the SAS data step functions
  • enter parameters into a model linearly or in any nonlinear functional form
  • fit dynamic linear models, state space models, autoregressive models, or other models that have a conditionally dependent structure on either the random-effects parameters or the response variable
  • fit models that contain differential equations or models that require integration
  • use an adaptive blocked random-walk Metropolis algorithm that uses a normal or t proposal distribution by default
  • use a Hamiltonian Monte Carlo algorithm with a fixed step size and predetermined number of steps
  • use a No-U-Turn sampler with the Hamiltonian algorithm
  • create a user defined sampler as an alternative to the default algorithms
  • create a data set that contains random samples from the posterior predictive distribution of the response variable
  • perform BY group processing, which enables you to obtain separate analyses on grouped observations
  • take advantage of multiple processors
  • create a SAS data set that corresponds to any output table
  • automatically create graphs by using ODS Graphics

For further details see the MCMC Procedure