Learn R Programming

spatstat (version 1.56-1)

rtemper: Simulated Annealing or Simulated Tempering for Gibbs Point Processes

Description

Performs simulated annealing or simulated tempering for a Gibbs point process model using a specified annealing schedule.

Usage

rtemper(model, invtemp, nrep, …, start = NULL, verbose = FALSE)

Arguments

model

A Gibbs point process model: a fitted Gibbs point process model (object of class "ppm"), or any data acceptable to rmhmodel.

invtemp

A numeric vector of positive numbers. The sequence of values of inverse temperature that will be used.

nrep

An integer vector of the same length as invtemp. The value nrep[i] specifies the number of steps of the Metropolis-Hastings algorithm that will be performed at inverse temperature invtemp[i].

start

Initial starting state for the simulation. Any data acceptable to rmhstart.

Additional arguments passed to rmh.default.

verbose

Logical value indicating whether to print progress reports.

Value

A point pattern (object of class "ppp").

Details

The Metropolis-Hastings simulation algorithm rmh is run for nrep[1] steps at inverse temperature invtemp[1], then for nrep[2] steps at inverse temperature invtemp[2], and so on.

Setting the inverse temperature to a value \(\alpha\) means that the probability density of the Gibbs model, \(f(x)\), is replaced by \(g(x) = C\, f(x)^\alpha\) where \(C\) is a normalising constant depending on \(\alpha\). Larger values of \(\alpha\) exaggerate the high and low values of probability density, while smaller values of \(\alpha\) flatten out the probability density.

For example if the original model is a Strauss process, the modified model is close to a hard core process for large values of inverse temperature, and close to a Poisson process for small values of inverse temperature.

See Also

rmh.default, rmh.

Examples

Run this code
# NOT RUN {
   stra <- rmhmodel(cif="strauss",
                    par=list(beta=2,gamma=0.2,r=0.7),
                    w=square(10))
   nr <- if(interactive()) 1e5 else 1e4
   Y <- rtemper(stra, c(1, 2, 4, 8), nr * (1:4), verbose=TRUE)
# }

Run the code above in your browser using DataLab