pottsgibbs {bayess}R Documentation

Gibbs sampler for the Potts model

Description

This function produces one simulation of a square numb by numb grid from a Potts distribution with four colours and a four neighbour structure, relying on niter iterations of a standard Gibbs sampler.

Usage

pottsgibbs(niter, numb, beta)

Arguments

niter

number of Gibbs iterations

numb

size of the square grid

beta

parameter of the Potts model

Value

returns a random realisation from the Potts model

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.

See Also

pottshm

Examples

ex=pottsgibbs(100,15,.4)
image(ex)

[Package bayess version 1.6 Index]