rmh(model, ...)
"ppp"
.
See rmh.default
for details.rmh
is generic; it has methods
rmh.ppm
(for objects of class "ppm"
)
and rmh.default
(the default).
The actual implementation of the Metropolis-Hastings algorithm is
contained in rmh.default
.
For details of its use, see
rmh.ppm
or rmh.default
. [If the model is a Poisson process, then Metropolis-Hastings
is not used; the Poisson model is generated directly
using rpoispp
or rmpoispp
.]
In brief, the Metropolis-Hastings algorithm is a Markov Chain, whose states are spatial point patterns, and whose limiting distribution is the desired point process. After running the algorithm for a very large number of iterations, we may regard the state of the algorithm as a realisation from the desired point process.
However, there are difficulties in deciding whether the algorithm has run for ``long enough''. The convergence of the algorithm may indeed be extremely slow. No guarantees of convergence are given!
While it is fashionable to decry the Metropolis-Hastings algorithm for its poor convergence and other properties, it has the advantage of being easy to implement for a wide range of models.
rmh.default
# See examples in rmh.default and rmh.ppm
Run the code above in your browser using DataLab