The MCMC Procedure

Syntax: MCMC Procedure

The following statements are available in the MCMC procedure. Items within < > are optional.

PROC MCMC <options> ;
ARRAY arrayname [ dimensions ] <$> <variables-and-constants> ;
BEGINCNST/ENDCNST ;
BEGINNODATA/ENDNODATA ;
BY variables ;
MODEL variable ~distribution <options> ;
PARMS parameter <=> number </ options> ;
PREDDIST <’label’> OUTPRED=SAS-data-set <options> ;
PRIOR/HYPERPRIOR parameter ~distribution ;
Programming statements ;
RANDOM random-effects-specification </ options> ;
UDS subroutine-name (subroutine-argument-list) ;

The PARMS statements declare parameters in the model and assign optional starting values for the Markov chain. The PRIOR/HYPERPRIOR statements specify the prior distributions of the parameters. The MODEL statements specify the log-likelihood functions for the response variables. These statements form the basis of most Bayesian models.

In addition, you can use the ARRAY statement to define constant or parameter arrays, the BEGINCNST/ENDCNST and BEGINNODATA/ENDNODATA statements to omit unnecessary evaluation and reduce simulation time, the PREDDIST statement to generate samples from the posterior predictive distribution, the program statements to specify more complicated models that you want to fit, the RANDOM statement to specify random effects and their prior distributions, and the UDS statement to define your own Gibbs samplers to sample parameters in the model.

The following sections provide a description of each of these statements.