The Gibbs sampler is a Markov Chain Monte Carlo (MCMC) algorithm that generates samples from a high-dimensional joint posterior by iteratively drawing each block from its full conditional , cycling until the chain converges to the target distribution.
Given a joint density with known full conditional densities :
The resulting sequence is a Markov chain whose equilibrium distribution is under mild regularity conditions (Geman and Geman 1984; Tierney 1994).
That the Gibbs sequence converges to the target marginal is a consequence of Markov chain theory (Casella and George 1992). In the discrete 2-variable case, define:
The -only subsequence is a Markov chain with transition matrix:
Provided all entries of are positive (irreducibility), the chain converges to a unique stationary distribution satisfying . One verifies directly that this is the marginal distribution of — the iteration has nowhere else to go. In the continuous case, the same argument extends via the integral analogue (their eq. 3.5).
Conditionals determine marginals. If the joint exists, then satisfies the fixed-point integral equation: The Gibbs iteration is the computational device for solving (FP).
Failure mode 1: improper marginals. When and do not correspond to any proper joint density, the Gibbs sequence fails to converge. Canonical example: , on . Equation (FP) yields , which is not a density. The sufficient condition for convergence is that is proper (); restricting the conditionals to a compact interval guarantees this. Formal conditions are analyzed by Hobert and Casella (1996).
Failure mode 2: proper conditionals, improper joint (Besag, Scollnik). A subtler failure: a set of proper full conditional distributions need not define a proper joint. Example (Gelfand 1994, cited by Scollnik): on gives two valid univariate Normal conditionals — and — but the joint is improper. Running Gibbs on these conditionals will either fail to converge or converge to a state without a valid probabilistic interpretation. The Besag (1974) result guarantees uniqueness only when the joint distribution is known to be proper; it does not certify existence from conditionals alone.
The Gibbs sampler appears in several distinct vector autoregression (VAR) contexts, each exploiting different closed-form conditional structures:
Waggoner-Zha (2000, 2003b) — Structural VAR. Partitions structural parameters into equation-by-equation blocks : the lag-coefficient block has a Gaussian conditional; the contemporaneous block has a conditional that decomposes into a Univariate Wishart (UW) draw and Normal draws via an orthonormal basis (LU decomposition). See Structural Identification and the detailed derivation below.
Villani (2008) — Steady state VAR. Three-block sampler over where all full conditionals are Inverse-Wishart or Normal. The block update stabilizes the sampler near unit roots. See Steady State VAR.
Bauwens-Giot (1997) — Cointegrated VAR. Full conditionals for the cointegrating vector elements have no closed form; the Griddy-Gibbs algorithm is used (see below). See Cointegration.
Albert-Chib (1993) — Markov-switching AR. Data augmentation: the latent state sequence is added as a Gibbs block, converting Hamilton's 2^T mixture likelihood into tractable conditionals. States drawn by a single backward binary pass; regression and variance blocks are truncated Normal and Inverse-Gamma; transition probabilities are Beta. Identified by , . Foundational univariate Bayesian precursor to the MS-VAR literature. See Markov-Switching VAR.
Chib (1996) — Joint state sampling for Markov mixture models. Replaces the -block single-move sampler of Albert-Chib (1993) with a joint draw of the full state sequence in one Gibbs block. Forward pass: compute filter matrix via ( = row of component densities at ; element-wise). Backward pass: draw from last row of ; for draw (eq. 7). Transition matrix : Dirichlet conjugate from counts (eq. 10). Discrete-state counterpart of the Carter-Kohn (1994) simulation smoother; became the standard for Bayesian Markov-switching estimation. See Markov-Switching VAR and Chib (1996).
Albert-Chib (1993b) — Binary and polychotomous probit. Data augmentation for binary regression: introduce latent with . Two-block Gibbs: (eq. 5) and truncated Normal at 0 (eq. 6). Extensions: t-link via four-block scale-mixture sampler (eqs. 7–11), hierarchical shrinkage prior (eqs. 13–14), ordered multinomial with uniform threshold block (eqs. 16–18), unordered multinomial probit via accept-reject multivariate truncated Normal (eqs. 19–21). See Binary Probit.
Chib-Greenberg (1998) — Multivariate probit for correlated binary data. The -variate response with and ; must be in correlation form (unit diagonal) for identifiability — free off-diagonal elements . Three-block Gibbs: (1) — MVN truncated to (product of half-lines from ), sampled by cycling through univariate truncated normals (Geweke 1991); (2) — conjugate Normal (eq. 6): ; (3) — Metropolis-Hastings (M-H) with tailored independence/reflection chain (eq. 7): proposal mode from Newton-Raphson on , covariance from negative inverse Hessian; for high-dimensional , partition into blocks applied sequentially. Likelihood evaluation via the GHK (Geweke-Hajivassiliou-Keane) method (Cholesky , change of variables, recursive truncated-normal draws, eq. 11). Posterior ordinate via kernel density (eq. 10) — this is the precursor approach that Chib-Jeliazkov (2001) superseded with the two-expectation M-H identity. See Chib-Greenberg (1998), Binary Probit, and Multinomial Probit.
Kadiyala-Karlsson (1997) — Normal-Diffuse and Extended Natural Conjugate (ENC) Bayesian VAR (BVAR). Two new Gibbs samplers derived for the Normal-Diffuse (2-block) and ENC (equation-by-equation) posteriors; compared against importance sampling across 3- and 7-variable models. Gibbs achieves relative numerical efficiency (RNE) ≈ 1 at all model sizes; importance sampling collapses for the 7-variable model. See Noninformative Prior for VAR and Vector Autoregression.
Write the structural VAR as . Linear zero restrictions take the form on contemporaneous coefficients and on lag coefficients, where and are the th columns of and . The free parameters are and , where and are orthonormal bases for the null spaces of and .
Joint posterior (Theorem 1). Under the Sims-Zha (1998) reference prior, the joint posterior factorizes as where:
The determinant factor renders the joint distribution non-Gaussian — it lies on a curved ridge in parameter space. Importance sampling with a Gaussian proposal concentrates almost all weight on a single draw (Figure 3b: single spike), making it useless for simultaneous-equations models.
Theorem 2 (Gibbs step for ). Conditional on all other equations, where is an orthonormal basis in computed at each step via LU decomposition of the current draw of the other equations' free parameters. The scalar coefficients distribute as:
Univariate Wishart (UW) distribution. The density is:
A draw is obtained as where — a one-line computation.
Lag-coefficient block. Conditional on the current , the free lag parameters have a Gaussian conditional — standard ordinary least squares (OLS) on the restricted system — and are drawn directly.
Theorem 3 / Corollary 1 (Independence conditions). The Gibbs draws across equations are exactly independent iff there exist a permutation matrix and orthogonal matrix such that is upper triangular for all admissible . Block-recursive exclusion restrictions are sufficient: if the contemporaneous matrix is block-lower-triangular after permutation, all cross-block draws are independent. In this case there is no need to run long chains — effective sample size equals the number of draws.
Convergence validation. Applied to Sims's (1986) 6-variable VAR (, , , , , ; 1948:1–1989:3; 20 free structural parameters in ). Five chains started from overdispersed initial draws; Gelman-Rubin for all parameters within ~500 sweeps. The monetary-policy and interest-rate-defense equations satisfy Corollary 1 and yield exactly independent draws.
The prior , yields two closed-form full conditionals, enabling direct Gibbs sampling without importance functions:
Block 1 — : Normal with precision :
Block 2 — : Wishart with scale and degrees of freedom:
Both blocks are standard random-variate draws. The dominant cost is the Cholesky decomposition of the precision matrix in Block 1: per Gibbs step.
Under the Drèze-Morales (1976) ENC reparametrization (see Noninformative Prior for VAR), there is no standard-form block decomposition for the full posterior. However, each equation's full conditional is a multivariate by Drèze-Richard (1983) Lemma 6.4: where , , are equation-specific quantities derived from the ENC reparametrization and the current draw of all other equations. One full cycle iterates over all equations at cost — more efficient than the Normal-Diffuse 2-block sampler when and are both large.
The relative numerical efficiency of method is: It equals the fraction of direct i.i.d. draws that would achieve the same estimator variance. Gibbs sampling achieves RNE ≈ 1 at all model sizes. Importance sampling achieves moderate RNE for small models (3 variables) but collapses to RNE ≈ 0 for the 7-variable model because condition (15) — requiring so that the IS normalizing constant is numerically stable — fails severely ( in the reported experiment).
Antithetic variates (GAIN): Drawing (sign-flipped Normal variate through the posterior mode) reduces IS variance: For near-symmetric posteriors and . Draws are obtained from the antithetic 2-0 poly- importance function via the Bauwens-Richard (1982) decomposition. See also Geweke (1988) for the general principle.
CPU scaling across methods:
| Method | Cost per draw/step | 7-var / 3-var overhead |
|---|---|---|
| Normal-Wishart / Diffuse | ||
| STFC importance function | ||
| ENC equation-by-equation Gibbs | ||
| Normal-Diffuse 2-block Gibbs |
Full comparative experiment required >200 CPU hours (1997 hardware) per prior across 3- and 7-variable Canadian macro VARs.
When comparing models via MCMC, the natural approach of adding a discrete model indicator to the Gibbs scheme fails due to an absorbing state problem: at iteration , if forces parameter () out of the active model, there is no mechanism to regenerate at the next step — the chain gets trapped, violating irreducibility.
Solution: pseudo-priors. Carlin and Chib (1995) augment the joint model with linking densities for inactive parameters. Since , these densities are computationally transparent — they don't affect — but they keep every parameter vector accessible at every step. The full conditional for the model indicator is:
This is a proper discrete distribution, computable at each iteration. All other blocks alternate between the true model posterior (when active) and the pseudo-prior (when inactive). Standard regularity conditions (Roberts and Smith 1993; Tierney 1994) then guarantee convergence.
Practical implementation.
Pseudo-prior accuracy determines mixing speed: well-matched pseudo-priors produce frequent moves between models; diffuse pseudo-priors lead to high autocorrelation in the -chain. Prior weights can be adjusted to correct imbalance (one model visited too rarely), without invalidating the Bayes factor estimate.
Relation to Marginal Data Density. The Carlin-Chib sampler targets the posterior model probabilities directly; Chib (1995) instead estimates from a single-model run via the identity . Both approaches give the same Bayes factors; Carlin-Chib is more direct for small , Chib scales better for large .
In VAR-TVP models, the latent state path must be drawn jointly rather than one element at a time (single-move Gibbs has severe mixing problems). The multimove algorithm (Carter and Kohn 1994) proceeds in two passes:
Step 1 — Forward Kalman filter (): run the standard Kalman recursions to compute filtered means and covariances conditional on and the current draw of static parameters.
Step 2 — Backward simulation smoother (): draw sequentially from Gaussians whose moments are updated using the next-period state draw:
The draws from this pass are exact samples from the joint posterior . The bottleneck is the matrix inversion at each step, which collapses to under a Kronecker covariance structure (see Time-Varying Parameter VAR). See State-Space Representation for the underlying Kalman filter.
When the prior on is the Yang-Berger (1994) reference prior rather than the standard Jeffreys prior , the conditional posterior has no inverse-Wishart form. Sun and Ni (2005) sample within the Gibbs sampler using a Metropolis hit-and-run step in the log-eigenvalue space:
The log-transform ensures remains positive definite throughout. Acceptance rate is ~32% in practice. The algorithm is nested as one block within a larger Gibbs loop over . See Noninformative Prior for VAR.
When a full conditional has no standard analytical form, the Griddy-Gibbs algorithm (Gelfand and Smith 1990) proceeds as follows:
The grid must cover the region of non-negligible probability; is typically sufficient for unimodal conditionals. The key limitation is slow convergence if the conditional is multimodal — runs with different starting values help diagnose this.
Griddy-Gibbs evaluates the log-conditional density on a numerical grid. When the conditional is known to be log-concave, Gilks-Wild (1992) adaptive rejection sampling (ARS) offers an exact alternative: it constructs a piecewise-exponential envelope using function evaluations and their derivatives, samples from the envelope by inversion, and accepts/rejects — adapting the envelope at each rejection, so the acceptance probability rises to 1 without tuning.
The hyperparameter bottleneck in conjugate hierarchical models. Consider an exponential-family hierarchy:
The blocks draw conjugately. The hyperparameter block has full conditional:
where is the conjugate likelihood distribution — the likelihood of treating as i.i.d. draws from the conjugate prior:
Theorem 3.3 (George-Makov-Smith 1993): is log-concave in ; proper marginally for all ; proper jointly iff .
Gamma-Poisson case (Corollary 3.5): For :
Complete exact Gibbs cycle (pump failure, ):
Every step is exact. No grid approximation or Metropolis acceptance/rejection step required. This is more efficient than Griddy-Gibbs when log-concavity holds, since ARS needs only the log-density and its gradient rather than a CDF computed on a fixed grid.
Contrast with Griddy-Gibbs: Griddy-Gibbs applies universally (any proper conditional) but approximates via CDF inversion on a finite grid. ARS applies only to log-concave conditionals but is exact and self-adapting. For the conjugate hierarchical hyperparameter problem, ARS is the preferred method when the conditional is one of the standard families (Gamma, Beta).
Replacing the direct estimator of :
with the Rao-Blackwellized estimator:
always reduces variance: . With the Griddy-Gibbs sampler, is the conditional mean over the grid — computed at each step anyway, so the RB estimator comes nearly for free.
The same principle extends to second moments: the within-group conditional variance (known analytically from the conditional pdf) is averaged alongside the conditional mean to obtain a lower-variance estimate of .
The principle extends equally to density estimation: instead of histogramming the sampled values, estimate by averaging the conditional densities at the simulated companion values: Since , equation (RB-density) is unbiased whenever . Casella and George (1992, eq. 2.9) demonstrate it on both continuous and discrete examples; the analytic justification is provided by Liu, Wong, and Kong (1994).
Extension to Accept-Reject and Metropolis (Casella-Robert 1996). The same ancillary-variable argument extends beyond Gibbs. In the Accept-Reject algorithm, the uniform variables that decide whether to accept candidate are ancillary. Rather than discarding rejected draws, one can compute Rao-Blackwellised weights: via an recurrence on , yielding estimator . mean squared error (MSE) reduction: 15–20% at acceptance rate 0.9, up to 60% at rate 0.3 — permanently, regardless of sample size. For the Metropolis algorithm, the analogous weights = expected number of times appears in the chain (computed via a similar recursion) yield ~40–50% MSE reduction in the independent case and 7–25% in the random-walk case. A key empirical finding: a Rao-Blackwellised importance sampling estimator built on the Metropolis chain achieves 70–95% MSE reduction — substantially better than RB Metropolis itself — suggesting that the Metropolis mean is a poor estimation device (though the algorithm remains valuable as a sampler).
When two or more parameters have high posterior correlation, their marginal chains exhibit high autocorrelation and the effective sample size per draw drops sharply. The solution is to draw the correlated block jointly from the multivariate conditional :
Bauwens-Giot (1997) report 5–7× reduction in estimator variance for the price elasticity parameters (, , posterior correlation ), with comparable CPU cost per unit of accuracy. The general principle is formalized in Liu, Wong, and Kong (1994).
Chib-Carlin (1999) — Blocked Gibbs for hierarchical longitudinal models. The Gaussian linear mixed model has the standard 4-block Gibbs with severe mixing when variance components and are both vague. Three progressively blocked algorithms address this: (1) Algorithm 2 — draw marginalized over using , ; produces essentially iid draws (autocorrelation time drops from 20 to 1 in the HIV CD4 example). (2) Algorithm 3 — evaluate the integrated likelihood via the Chib (1995) identity as a ratio of three Normal densities evaluated at the posterior mean : ; update jointly by M-H with multivariate- proposal; reduces from 60 to 11. For binary longitudinal probit, marginalizing over connects to the Chib-Greenberg (1998) multivariate probit; Algorithm 7 fully marginalizes over and via the GHK likelihood to achieve near-iid draws at lag 10 (0.009 vs 0.934). Universal rule: always marginalize fixed effects over random effects before sampling. See Chib-Carlin (1999) and Bayesian Hierarchical Model.
When the VECM has a Kronecker-structured prior — and — the deterministic blocks can be integrated out of the joint posterior analytically. This yields a marginal Gibbs sampler (Warne 2006, Proposition 5) that cycles over only three blocks:
The cost is a reduction in the Wishart degrees of freedom — an increase in posterior precision — because the integration over concentrates mass. The full six-block sampler (Proposition 1) and the marginal three-block sampler yield the same marginal posterior for but the marginal sampler has lower autocorrelation per draw.
Rao-Blackwellization for the marginal likelihood. The marginal Gibbs output is used to estimate by averaging analytic Gaussian conditionals: . This is a Rao-Blackwell estimator for the posterior density at a point — the same principle as in the Bauwens-Giot and Savage-Dickey cases but applied to the Chib (1995) MLI denominator (see Marginal Data Density).
Three main strategies for exploiting the Gibbs sequence, each with different trade-offs:
Final- method (Gelfand and Smith 1990): Run independent chains of length ; use the terminal value from each. Yields an approximately iid sample from when is large enough. Diagnostic: compare density estimates from the chains and stop at the first at which they appear identical ("felt-tip pen test"). Simple to parallelize.
Thinning by (Geyer): Run one long chain; extract every th observation to reduce serial dependence. Advantage: less sensitivity to initial values. Risk: the chain may remain in a small subset of the sample space for an extended period (Gelman and Rubin 1991), which thinning does not cure.
All post-burn-in (George and McCulloch 1993): Use every for . Least wasteful for computationally expensive models; the empirical distribution still converges to by ergodicity. The mixing rate of the chain determines the effective sample size per draw. In the SSVS variable-selection setting, all post-burn-in draws are tabulated to estimate marginal inclusion probabilities .
The Rao-Blackwell density estimator (RB-density) is applicable under any of these strategies and consistently outperforms direct histogram methods at no additional computational cost.
Thinning — keeping only every th draw from a length- run — never reduces the variance of posterior mean estimates and generally increases it. MacEachern-Berliner (1994) prove this for any stationary Markov chain, requiring no reversibility assumption and thus covering the standard fixed-scan Gibbs sampler.
The inefficiency proof. Partition the run into systematic subsample means: By stationarity, all subsample means have the same variance: . The full-chain mean satisfies: because . Equality holds only when the distribution is degenerate (constant). Hence the full chain weakly dominates any systematic subsample.
The stationary time series trap. The spectral variance formula can suggest that thinning wins when : for an AR(1)-type autocorrelation sequence with , for , and , the thinned variance equals while the full-chain variance equals , which exceeds when . But stationarity with this autocorrelation structure requires — the scenario never arises. The constraints on the autocorrelation function of any stationary process close off every parameter combination that would make thinning beneficial.
Extension beyond Geyer (1992). Geyer's (1992) analogous result required chain reversibility (detailed balance). MacEachern-Berliner require only stationarity, since Tierney (1992) noted that the standard fixed-scan Gibbs sampler is typically non-reversible.
Preferred alternatives. Batching (block-mean variance estimator) and spectral variance estimation (see Spectral Variance Estimator above) use the full chain and are uniformly preferred for variance estimation. The only legitimate reason to thin is computational: limited storage capacity before processing, or when processing cost per draw exceeds generation cost — a scenario more relevant in 1994 than today.
A primary actuarial output is the posterior predictive distribution for future data given observed data :
The MCMC estimate follows directly from the ergodic theorem (eq. 2.2): average over posterior draws . This is the same principle as the Rao-Blackwell density estimator (RB-density) — conditional densities averaged over sampled parameters — and requires no extra computation beyond the Gibbs run itself.
Posterior inference on any transformation is equally free: compute and form the empirical distribution.
When observations are grouped (only class frequencies observed, not exact values), a data augmentation approach adds the unobserved exact values as latent auxiliary variables, making the full conditionals tractable. For losses from Pareto() observed in class intervals with counts :
Side inferences on tail events — e.g., P(at least one open-interval loss ) — are read directly from the simulated augmented data, requiring no additional computation.
The augmentation idea generalizes: any latent-variable model (censored data, mixture models, state-space models) can be handled by adding the missing data as a Gibbs block.
Stochastic Search Variable Selection (SSVS) casts subset selection as a Gibbs problem over , where is a latent binary inclusion vector added as an augmentation block. See Variable Selection for the full model; the Gibbs structure is:
Block 1 — : Conjugate Normal draw given current — the mixture prior yields a closed-form posterior:
Block 2 — : Conjugate Inverse-Gamma draw given current .
Block 3 — : Independent Bernoulli draws. For each , the inclusion probability is where and — evaluating the spike and slab Normal density at the already drawn . Crucially, enters only through , not directly.
The all-post-burn-in strategy reads off the empirical frequency of across draws as an estimate of , navigating model space without enumeration.
The Bauwens-Rombouts (2005) sampler for the Mixture-of-Normals GARCH model illustrates two non-standard Gibbs patterns within a GARCH context:
Data augmentation for the mixture: Latent state variables are added as a Gibbs block. Conditional on states, each GARCH component's likelihood factors, converting the mixture problem into separate conditional problems. The state draw is multinomial: .
Griddy-Gibbs for GARCH parameters: The GARCH parameters per component have no conjugate conditional because GARCH variances depend on past observations recursively. The griddy-Gibbs algorithm evaluates the log-conditional density on a 3-D grid, numerically integrates to form the CDF, and inverts via linear interpolation. Positivity constraints , , , and the stationarity constraint (for stationary components) bound the grid.
Dirichlet conjugate for mixing weights: where . This is the same conjugate update as in the i.i.d. mixture case; conditioning on makes it valid even in the GARCH setting.
Constrained mean block: The free means are drawn jointly from a multivariate Normal that enforces the zero-mean constraint via a linear substitution.
See GARCH and BEKK-GARCH and Mixture of Normals for the model context.
When groups of SUR equations share a common coefficient vector but have group-specific parameters and covariance matrices , the fully conjugate Gibbs sampler decomposes into three natural blocks:
Model: , ; ; each set has observations and equations.
Block 1 — : The residual within set after removing both set-specific and common effects is , and (reshaped to ). One Inverted-Wishart draw per set, all draws are independent given the other blocks.
Block 2 — : Within set , partial out the common contribution from the dependent variable, then run a standard GLS draw. The precision matrix is block-diagonal within the set.
Block 3 — : The precision matrix pools information across all sets:
This is the novel block: it is the GLS estimator for that treats each set as contributing observations to a pooled regression, weighted by its own . Compared to Percy (1992) and Chib-Greenberg (1995b), which handle single-set SUR, this block aggregates cross-set information in one conjugate step.
Key distinction from Baltagi (1995): Baltagi assumes the same for all sets; Griffiths-Valenzuela allow distinct unrestricted per set, which is more flexible but requires separate Block 1 draws for each .
Applications (Griffiths-Valenzuela 2002):
See Equivalence Scale and Seemingly Unrelated Regression.
Hahn, Carvalho, and Scott (2012) construct a 12-step conjugate Gibbs sampler for the sparse factor analytic probit model applied to high-dimensional binary outcomes. The sampler extends Chib-Greenberg (1998) by replacing the unstructured correlation matrix with a sparse factor decomposition.
Model: ; ; ; lower triangular (, for ); ; free positive-definite.
Spike-and-slab prior on loadings: ; ; .
Selected Gibbs blocks:
| Step | Variable | Conditional | Form |
|---|---|---|---|
| 3 | Truncated Normal: for Republicans, for Democrats | ||
| 5 | ; ; | ||
| 6 | |||
| 7 | Spike-and-slab: compute Bayes factor ; | ||
| 10 | Truncated : if , if |
Key design choices:
Simulation results (Table 1, n=50):
| Model | p=20 Stein loss | p=100 Stein loss |
|---|---|---|
| Sparse-6-factor (k=3 true) | 3.0 | 43.4 |
| Factor (no sparsity) | 4.3 | 136.7 |
| Wishart | 11.9 | 503.1 |
Senate application (1949–2009): Three-factor model on 30 closest roll-call votes per term. Partisanship factor extracted as party-aligned dimension; dimensionality of bills stable across decades; partisanship low in late 1960s–early 1970s, increased sharply from 1979.
See Sparse Factor Probit, Multivariate Probit, and Variable Selection.
Geweke (1993) shows that a linear regression with i.i.d. Student-t() errors can be sampled by a four-block conjugate Gibbs sampler once the latent scale weights are included. The equivalence with renders the following full conditionals all conjugate:
| Block | Variable | Conditional | Form |
|---|---|---|---|
| 1 | IG: | ||
| 2 | IG: | ||
| 3 | Normal: GLS | ||
| 4 | (optional) | Non-standard kernel; exponential prior recommended |
Posterior odds ratios between competing degrees-of-freedom values are available as a by-product of the Gibbs output, as an expectation under the -posterior (eq. 16). Convergence proofs (Theorems 4–5) are provided for fixed and for the exponential-prior case.
Connection to SV models. The cross-sectional weights here are the static predecessor of the time-varying in the Jacquier-Polson-Rossi (1994) stochastic volatility model: JPR's data-augmentation with a latent variance path is the dynamic extension of Geweke's latent scale weights. See Geweke (1993), Mixture of Normals, and Stochastic Volatility.
Geweke (1996) shows how to impose linear inequality constraints on the coefficients of a normal linear regression entirely within a Gibbs sampler, without the accept-reject inefficiency of the crude frequency simulator.
Key reparameterization. Let , , , . The constraint region becomes coordinate by coordinate. The two full conditionals are:
The critical insight is that rotating the problem by converts joint constraints into independent per-coordinate bounds, so each 's full conditional is a univariate (not multivariate) truncated normal — directly samplable via inverse-CDF. The chain converges in distribution to the constrained posterior because there is positive probability of moving to any positive-posterior region in one step.
Computational advantage. When the constraint probability is small (e.g., for the automobile sales example with k=11 sign constraints), the crude accept-reject simulator requires hours for 1,000 valid draws; the Gibbs sampler achieves equivalent accuracy in 49 minutes using every-100th draw.
Extensions. The same template applies to any model where a parameter block's conditional distribution is truncated multivariate normal: SUR models, censored regression, multinomial probit, and scale-mixture regression (Student-t with inequality constraints — the draws inherit the scale weights from Geweke 1993). See Geweke (1996) and Multinomial Probit.
Geweke and Keane (1999) construct a fully conjugate Gibbs sampler for binary probit with a -component Gaussian mixture disturbance. The augmented state at each iteration consists of: the Albert-Chib (1993b) latent utilities and a new set of component-assignment indicators . The six blocks, all with standard-form conditionals, are:
| Block | Variable | Conditional | Form |
|---|---|---|---|
| 1 | Truncated Normal on or ; mean , precision | ||
| 2 | Multinomial: | ||
| 3 | Normal: precision-weighted regression with | ||
| 4 | Normal with ordering constraint; draws via Geweke (1991)/(1995) truncated-Normal algorithm | ||
| 5 | () | ; updated by component SSR | |
| 6 | Dirichlet with counts |
Dual augmentation principle. Block 1 is the Albert-Chib (1993b) latent-utility device; block 2 is the Chib (1996)-style component-assignment device. Together they handle both the binary truncation and the mixture non-Gaussianity within a single unified Gibbs cycle. The same pattern (latent utility + component label) generalizes to multinomial probit with mixture disturbances (Geweke-Keane-Runkle 1994, 1997).
Marginal likelihood. The Gelfand-Dey (1994) estimator, using a truncated multivariate Normal function centered at posterior mean of , avoids the dimension explosion that would arise from including in the parameter space; the analytically marginalized likelihood (eq. 2.15) is .
See Geweke-Keane (1999), Binary Probit, and Mixture of Normals.
Geweke and Keane (2000) illustrate two non-standard Gibbs patterns in a dynamic panel earnings model fitted to the PSID:
Unbalanced panel augmentation. Individuals enter and exit the panel at different ages, breaking the balanced-panel structure required for tractable AR-based conditionals. Unobserved period earnings are added as latent variables; their full conditional is Gaussian from the model's AR structure, enabling a complete balanced panel at each Gibbs iteration.
Mixture-of-normals block. First-period shocks and transitory increments each follow a 3-component mixture . Latent component indicators are added as a Gibbs block; conditional on , all parameters have conjugate Gaussian or Gamma conditionals. Proper Gamma priors on precisions are essential: the mixture likelihood is unbounded as for any non-empty component unless regularized. The normalization , prevents label switching.
The 8-block earnings sampler (plus marital status and individual effects ) achieves RNE of 0.05–1.0; the full PSID sample requires ~332 sec per iteration and 2,500 sweeps. See Mixture of Normals for the general framework.
When a full conditional takes the non-standard form — where is a proper density and each is non-negative and invertible — Damien, Wakefield, and Walker (1999) show how to construct a Gibbs sampler with only uniform and truncated-standard conditionals.
Theorem 1. Introduce latent variables for . The joint density of is:
The full conditionals are:
The key requirement is that the invertibility of each gives an analytical expression for , making the truncated draw tractable.
"Always moves" property. The auxiliary variable sampler is equivalent to a Metropolis-Hastings independence chain with proposal but one that always moves — the chain never rejects. This is because sampling before conditions the proposal on falling in the acceptance region of the implied MH step. This dominates the corresponding MH independence chain for any estimand (Peskun 1973 optimality argument).
Choosing latent variables. The decomposition is not unique; this flexibility is exploited to obtain computable truncation sets. For example:
Applications in the paper:
Numerical comparison (Lindstrom-Bates 1990 orange-tree growth data): 7 trees, 5 observations each, 3-dimensional random effect . Auxiliary variable Gibbs vs. random-walk MH for 10,000 iterations:
Caveats. The decomposition must be discovered case-by-case; there is no automatic algorithm. When an efficient rejection sampler or MH proposal already exists, the auxiliary variable approach may not improve efficiency. The "always moves" property does not guarantee rapid mixing if the truncation set is small relative to the support of .
See Damien-Wakefield-Walker (1999), Paul Damien, Jon Wakefield, Stephen Walker, and Metropolis-Hastings Algorithm.
Tierney (1994) establishes formal convergence properties using general state space Markov chain theory (Nummelin 1984). The key hierarchy:
Theorem 1 (Ergodic convergence). If the chain has invariant distribution , is -irreducible, and is aperiodic, then is the unique invariant distribution and for -almost all starting points :
Geometric ergodicity via drift condition. Suppose there exist a function , a "small" set (where uniformly), and constants and such that:
Then the chain is geometrically ergodic: for some (Proposition 1 / Tierney's formalization of Nummelin). This is the standard sufficient condition for central limit theorem (CLT) validity.
Theorem 4 (CLT for geometric ergodic chains). If the chain is geometrically ergodic and , then:
where the asymptotic variance is the spectral density at zero:
Geometric ergodicity guarantees this series converges absolutely. For uniform ergodicity (stronger: bounded uniformly), functions suffice (Theorem 5).
Practical implication. For a Gibbs or MH sampler to yield valid confidence intervals (via batch means or spectral variance estimation), geometric ergodicity must hold. For posteriors with sub-exponential tails, the drift condition is typically satisfied. For posteriors with heavy tails or bounded supports, uniform ergodicity often holds directly.
Peskun (1973) optimality of MH acceptance ratio. Among all Metropolis-type acceptance functions that leave invariant, the Hastings form minimises the rejection probability for any pair — and therefore minimises the asymptotic variance for any estimand. Barker's (1965) acceptance form is strictly worse by this criterion.
The Metropolis-Hastings (MH) algorithm generalizes Gibbs sampling to cases where a full conditional cannot be sampled directly. At each iteration, a candidate is drawn from a proposal density , then accepted with probability:
If rejected, the chain stays at . The Gibbs sampler is a special case: when (a full conditional), the ratio equals 1 everywhere and every candidate is accepted.
Practical choices for q:
When MH steps are nested inside a larger Gibbs cycle, the resulting algorithm is called Metropolis-within-Gibbs (or hybrid MH-Gibbs). See Jackman (2000) for worked examples in probit and AR(1) models.
Run independent chains of length from widely dispersed starting values; discard the first draws as burn-in. For a scalar parameter :
The potential scale reduction factor where . At convergence, ; values substantially above 1 (say ) indicate insufficient mixing. The intuition: if all chains have converged to the same distribution, the between-chain variance should equal the within-chain variance.
Given a target quantile , tolerance , and confidence level , the method computes the required burn-in , thinning interval , and total chain length from a short pilot run (~2,000 draws).
Step 1 — Binarize. Set where is the pilot-estimated -th quantile. Under stationarity, is approximately a first-order two-state Markov chain.
Step 2 — Fit transitions. Estimate and , where counts transitions. Check first-order adequacy via a deviance test vs. a second-order model; if rejected, thin by (use only every -th draw) until first-order holds.
Step 3 — Required burn-in. where is a small constant (e.g. 0.001) controlling closeness to stationarity.
Step 4 — Required chain length.
For low-autocorrelation chains, – is typical. Slowly mixing chains can require .
More targeted than Gelman-Rubin: rather than assessing whether convergence has been reached, it tells you how many iterations you need for a given inferential precision. The method is quantile-specific — apply to the most demanding quantile when multiple are of interest.
Gelman-Rubin and Raftery-Lewis diagnostics detect whether the chain has mixed — they do not detect convergence to an incorrect distribution. If the GS is trapped near one mode of a multimodal posterior, both diagnostics can indicate convergence while the estimated marginals are wrong.
Zellner and Min (1995) exploit the fact that when the joint posterior is known analytically up to a constant, two factorizations must hold simultaneously:
This identity can be evaluated pointwise using GS-estimated marginals , alongside the known conditional densities and .
Three GSC² criteria evaluated at parameter-space points :
| Criterion | Formula | Converged value |
|---|---|---|
| ARC² (Anchored Ratio) | vs. exact | |
| DC² (Difference) | ||
| RC² (Ratio) |
Inference on . Under large-sample theory, where the variance (equation 12) accounts for GS autocorrelation via the sample autocovariances of the GS draws. Posterior odds for vs. : This uses a Cauchy prior on under (Jeffreys 1967). For the SUR example, rises from 10.98 at to 118.68 at , strongly favoring and confirming correct convergence.
Bimodal failure detection. For the mixture (modes at and ), the GS gets stuck near . Although the chain appears stationary, the DC² criterion gives at , clearly nonzero — the GS has converged to the wrong marginals.
Limitation. The GSC² criteria require both the joint posterior form and the full conditional densities to be available analytically. They are not applicable in fully black-box settings where Gibbs is used precisely because no analytical form exists.
If the chain has converged, smoothly. Erratic or persistent drifts indicate the chain is exploring slowly or is stuck.
The Markov chain of sampled values is a dependent time series. The variance of the ergodic mean estimator is:
where is the spectral density of the series evaluated at :
A peak in near indicates strong low-frequency dependence (slow mixing). In practice, is estimated via a smoothed periodogram using one of three spectral windows applied to the sample autocovariances :
| Window | Weight for |
|---|---|
| Truncated periodogram | |
| Daniell | |
| Tukey-Hanning |
The bandwidth should be set to half the critical bandwidth of the spectrum — the frequency interval over which changes appreciably. For nearly white-noise chains ( for ), all windows give essentially the same , and few draws are needed. For chains with strong low-frequency peaks, must be large and long chains are required.
The formula (SE) yields a confidence interval for : a 95% CI is .