[R-sig-Geo] Simulating a Gibbs Marked point process
Rolf Turner
r.turner at auckland.ac.nz
Wed Apr 10 11:13:59 CEST 2013
On 04/10/2013 02:30 PM, Ferra Xu wrote:
> Hi everybody
>
> I want to simulate a pattern of points based on maximization of Gibbs marked point process density function by MCMC methods using R. I already know that rmh function in spatstat will do that, but I couldn't find any good example code for that... I don't know how should I determine the objective function that I want to be maximized in each iteration...
I don't really understand what you want to do. The rmh() [random
Metropolis Hastings]
function does not proceed by maximizing the density function of the
(Gibbs) process. It
uses a Markov chain (whose "states" are point patterns), the
Metropolis-Hastings algorithm,
and the *conditional intensity* function of the process, to effect the
simulation. The transitions
between states are governed by transition probabilities constructed so
that the *steady
state* distribution of the Markov chain is the distribution of the
desired process. There is
no maximization of anything --- at least not in any obvious way, as far
as I can see.
What do you mean by "I couldn't find any good example code"? There are
many examples
of code *using* the rmh() function in the online help. If you want to
see the code of rmh()
--- well, R and all of its contributed packages are open source.
Download the spatstat source
package and have a look! (Be warned --- the heavy lifting is done in C,
and the code is pretty
subtle and obscure. By my standards.)
cheers,
Rolf Turner
More information about the R-sig-Geo
mailing list