= Metropolis-within-Gibbs algorithm
{c}
= Metropolis-within-Gibbs
{c}
{synonym}
A <Metropolis-within-Gibbs> sweep updates one coordinate or block at a time by a <Metropolis–Hastings algorithm> transition whose invariant law is that block's <full conditional distribution>. For a proposal changing only block $j$, the acceptance ratio uses the full joint target with the other coordinates fixed, together with the reverse/forward proposal ratio. Each block kernel preserves the joint <posterior>, so their composition does as well. Conjugate blocks can instead use exact <Gibbs sampling> draws. Systematic composition need not be reversible, even when every block kernel is reversible.
Back to article page