Efficiency of proposal density is an issue, but where the form of the full conditional distributions is known, these may be used to obtain proposals for the above algorithm.
The special case of the Metropolis-Hastings algorithm, where the
proposal density, q is the product of full conditional
distributions is called the Gibbs sampler. For example, consider
the case of sampling from a target , with the knowledge
of the conditional distributions,
, and
.
Now, since
=
, detailed balance
holds and the proposal is always accepted. In practice, it is
possible that
is known, but that
has to be sampled
using more general methods. In this case Gibbs sampling is
combined with for example Metropolis-Hastings techniques. Such
a sampling method is sometimes referred to as
Metropolis-Hastings within Gibbs; although since Gibbs sampling
is a special case of Metropolis-Hastings, this terminology is
incorrect [9].