| rtemper | R Documentation |
Performs simulated annealing or simulated tempering for a Gibbs point process model using a specified annealing schedule.
rtemper(model, invtemp, nrep, ..., track=FALSE, start = NULL, verbose = FALSE)
model |
A Gibbs point process model: a fitted Gibbs point process model
(object of class |
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 |
start |
Initial starting state for the simulation.
Any data acceptable to |
track |
Logical flag indicating whether to save the transition history of the simulations. |
... |
Additional arguments passed to |
verbose |
Logical value indicating whether to print progress reports. |
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.
A point pattern (object of class "ppp").
If track=TRUE, the result also has an attribute
"history" which is a data frame with columns
proposaltype, accepted,
numerator and denominator, as described
in rmh.default.
.
rmh.default,
rmh.
stra <- rmhmodel(cif="strauss",
par=list(beta=2,gamma=0.2,r=0.7),
w=square(10))
nr <- if(interactive()) 1e5 else 1e3
Y <- rtemper(stra, c(1, 2, 4, 8), nr * (1:4), verbose=TRUE, track=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.