Although Monte Carlo methods have frequently been applied with success, ind
iscriminate use of Markov chain Monte Carlo leads to unsatisfactory perform
ances in numerous applications. We present a generalised version of the Gib
bs sampler that is based on conditional moves along the traces of groups of
transformations in the sample space. We explore its connection with the mu
ltigrid Monte Carlo method and its use in designing more efficient samplers
. The generalised Gibbs sampler provides a framework encompassing a class o
f recently proposed tricks such as parameter expansion and reparameterisati
on. To illustrate, we apply this new method to Bayesian inference problems
for nonlinear state-space models, ordinal data and stochastic differential
equations with discrete observations.