#
Bayesian Analysis Using the GENMOD Procedure

The GENMOD procedure
fits generalized linear models, which are an extension of traditional linear models. generalized linear models allow the mean of a population
to depend on a linear predictor through a nonlinear link function and allow the response probability distribution to be any member of an exponential
family of distributions. Many widely used statistical models are generalized linear models, including the following:

- classical linear models with normal errors
- Poisson and negative binomial models for count data
- logistic and probit models for binary data

Many other useful statistical models can be formulated as generalized linear models by the selection of an appropriate link function and
response probability distribution.

To perform Bayesian analyses with PROC GENMOD, you specify a model essentially the same way you do for a frequentist
approach, but you add a BAYES statement to request Bayesian estimation methods for fitting the model.
The BAYES statement
requests that the parameters of the model be estimated by Markov chain Monte Carlo sampling techniques and provides
options that enable you to specify prior information, control the sampling, and obtain posterior summary statistics and convergence diagnostics. You can
also save the posterior samples to a SAS data set for further analysis.

### Sampling Algorithms

The GENMOD procedure supports the following sampling algorithms:

- Conjugate sampling is the default for linear regression with conjugate priors.
- The adaptive rejection Metropolis algorithm (Gilks and Wild 1992; Gilks, Best, and Tan 1995) is the default for all other models.
- The Gamerman algorithm or the independent Metropolis algorithm can be specified for all models

(the Gamerman algorithm is faster than the adaptive rejection Metropolis algorithm).

### Priors

The GENMOD procedure supports the following priors:

**Parameter** |
**Prior** |

Regression coefficients |
Jeffereys', normal, uniform |

Dispersion |
Gamma, inverse-gamma, improper |

Scale, precision |
Gamma, improper |

### Bayesian Analysis Examples