Learn R Programming

bayess (version 1.6)

sumising: Approximation by path sampling of the normalising constant for the Ising model

Description

This function implements a path sampling approximation of the normalising constant of an Ising model with a four neighbour relation.

Usage

sumising(niter = 10^3, numb, beta)

Value

returns a vector of 21 values for \(Z(\beta)\) corresponding to a regular sequence of \(\beta\)'s between 0 and 2

Arguments

niter

number of iterations

numb

size of the square grid for the Ising model

beta

Ising model parameter

See Also

isingibbs,isinghm

Examples

Run this code
Z=seq(0,2,length=21)
for (i in 1:21)
  Z[i]=sumising(5,numb=24,beta=Z[i])
lrcst=approxfun(seq(0,2,length=21),Z)
plot(seq(0,2,length=21),Z,xlab="",ylab="")
curve(lrcst,0,2,add=TRUE)

Run the code above in your browser using DataLab