This is the original Geman and Geman (1984) Gibbs sampler
on the Ising model that gave its name to the method. It simulates
an \(n\times m\) grid from the Ising distribution.
Usage
isingibbs(niter, n, m=n, beta)
Value
x, a realisation from the Ising distribution
as a matrix of size n x m
Arguments
niter
number of iterations of the algorithm
n
number of rows in the grid
m
number of columns in the grid
beta
Ising parameter
References
Geman, S. and Geman, D. (1984)
Stochastic relaxation, Gibbs distributions and the Bayesian restoration of
images. IEEE Trans. Pattern Anal. Mach. Intell., 6, 721--741.