ABSTRACT

Once a posterior distribution has been derived, from the product of likelihood and prior distributions, it is important to assess how the form of the posterior distribution is to be evaluated. If single summary measures are needed then it is sometimes possible to obtain these directly from the posterior distribution either by direct maximization (mode: maximum a posteriori estimation) or analytically in simple cases (mean or variance for example)(see Section 2.3). If a variety of features of the posterior distribution are to be examined then often it will be important to be able to access the distribution via posterior sampling. Posterior sampling is a fundamental tool for exploration of posterior distributions and can provide a wide range of information about their form. Define a posterior distribution for data y and parameter vector θ as p(θ|y). We wish to represent features of this distribution by taking a sample from p(θ|y). The sample can be used to estimate a variety of posterior quantities of interest. Define the sample size as mp. For analytically tractable posterior distributions may be available to directly simulate the distribution. For example the Gamma-Poisson model with α, β known, in Section 2.7, leads to the gamma posterior distribution: θi ∼ G(yi + α, ei + β). This can either be simulated directly (on R: rgamma) or sample estimation can be avoided by direct computation from known formulas. For example, in this instance, the moments of a Gamma distribution are known: E(θi) = (yi + α)/(ei + β), etc.