Simulation of point process using MCMC Jakob G. Rasmussen Department of Mathematics Aalborg University Denmark March 2, 2011 1/14
Today When do we need MCMC? Case 1: Fixed number of points Metropolis-Hastings, Metropolis, Gibbs sampling Case 2: Varying number of points Birth/death algorithm DBC, reversibility, aperiodicity, irreducibility Practical issues 2/14
When do we need MCMC? We already know how to simulate Poisson processes Point processes specified by a conditional intensity Cox processes Cluster processes But what about Markov processes? Here we need MCMC, where we will exploit that fact that Markov processes are usually specified by a density or Papangelou conditional intensity. 3/14
MCMC in the case of a fixed number of points Suppose X has fixed number of points n(x) = n with density f wrt the unit rate Poisson process. For example, the Strauss process conditioned on n(x) = n has density f(x) β n(x) γ s(x) 1[n(X) = n]. When n(x) = n the Poisson expansion simplifies to P(X F) = f({u 1,...,u n })du 1...du n. S n 4/14
Metropolis-Hastings algorithm (single point update) Repeat for m = 0,1,...: Given current state Y m = (u 1,...,u n ) (i.e. an ordered point pattern) 1. generate I Unif({1,...,n}), 2. generate V q I (Y m, ), 3. replace u I with V to obtain proposal Y prop = (u 1,...,u I 1,V,u I+1,...,u n ), 4. let Y m+1 = Y prop with acceptance prob. min{1,r(y m,y prop )} where r(y m,y prop ) is the Hastings ratio: otherwise Y m+1 = Y m. r(y m,y prop ) = f(yprop )q I (Y prop,u I ) ; f(y m )q I (Y m,v) Note: Y prop and Y m are unordered. Initial state: the binomial process is a usually a convenient initial state. 5/14
Metropolis algorithm MH algorithm with symmetric q i, i.e. q i ((u 1,...,u n ),v) = q i ((u 1,...,u i 1,v,u i+1,...,u n ),u i ). Examples of symmetric proposal densities q i ((u 1,...,u n ),v) 1, q i ((u 1,...,u n ),v) 1[v N ui ] Then Hastings ratio reduces to Note that r(y m,y prop ) = f(yprop ) f(y m ). f(y prop ) f(y m ) = λ (V,Y prop \V) λ (u i,y m \u i ) so unknown normalizing constant cancels out and in the case of a Markov process the computations are local. 6/14
Gibbs sampler MH algorithm with q i ((u 1,...,u n ),v) f({u 1,...,u i 1,v,u i+1,...,u n }) Then Hastings ratio equal to one (always accept). Rejection sampling from conditional density in case of locally stable density λ (u,x) K(u): Given Y m and I = i, for j = 1,2,... 1. generate V j K( ), 2. generate R j Unif([0,1]), 3. return first V j for which R j λ (V j,y m \u i )/K(V j ). 7/14
Varying number of points - birth/death algorithm Proposals: Birth or death? - given Y m = x, p(x) is the probability of proposing birth, 1 p(x) is the probability of proposing death. Birth: New point generated from density q b (x, ) Death: Point selected from x with probability q d (x, ) (note: if Y m =, then Y m+1 = ). Hastings ratios: Birth: Death: r b (x,v) = f(x V)(1 p(x V))q d(x V,V) f(x)p(x)q b (x,v) r d (x,v) = f(x\v)p(x\v)q b(x\v,v) f(x)(1 p(x))q d (x,v) Note: birth/death/move algorithm has all three types of steps. Initial state: the Poisson process or the empty point pattern are convenient initial states. 8/14
Detailed balance condition Let a b = min{1,r b }, a d = min{1,r d } denote the acceptance probabilities for a birth or a death. Detailed balance condition (DBC): f(x)p(x)q b (x,v)a b (x,v) = f(x v)(1 p(x v))q d (x v,v)a d (x v,v) DBC is satisfied for the birth/death algorithm. Intuitively DBC tells us that there is balance between births and deaths. 9/14
Reversibility Reversibility: If Y m Π, then P(Y m F,Y m+1 G) = P(Y m G,Y m+1 F) Intuitively reversibility tells us that if we take a step in a Markov chain, we can also go back. Let E n = {x N f : n(x) = n,f(x) > 0}}, E = {x N f : f(x) > 0}}. Reversibility implies that the Markov chain has Π an invariant distribution. Proof that birth/death algorithm is reversible: three cases: rejection: reversibility follows from Y m = Y m+1. acceptance of birth: for F n E n and G n+1 E n+1, prove P(Y m F n,y m+1 G n+1 ) = P(Y m G n+1,y m+1 F n ). acceptance of death: as for birth. 10/14
Irreducibility and periodicity Irreducibility: Definition: A Markov chain is Ψ-irreducible, if Ψ(F) > 0 implies P m (x,f) > 0 for any x N f and some m > 0. Examples: Ψ(F) = P(X F) = Π(F) or Ψ(F) = 1[ F] Note: Ψ-irreducibility implies Π-irreducibility by Proposition 7.2(i) if an invariant distribution Π exists, p. 119. Intuitively irreducibility says that we can reach any relevant part of N f. Periodicity: Definition: A Markov chain is periodic if for N f = n i=0 D j disjoint, P(x,D j ) = 1 when x D j 1 (j > 1) and P(x,D 1 ) = 1 when x D n, and Π(D 0 ) = 0. Intuitively periodicity means that the chain is going in circles (and thus cannot converge to the right distribution) Roughly speaking, aperiodicity and irredicibility implies that the Markov chain converges to the right distribution (Proposition 7.7 (ii) on page 122). 11/14
Aperiodicity and irreducibility of birth/death chain Suppose initial state Y 0 E, p( ) < 1 and for all x E there is a v x: (1 p(x))q d (x,v) > 0 f(x\v)p(x\v)q b (x\v,v) > 0. Then birth-death chain is aperiodic and irreducible. 12/14
Birth-death simulation of Strauss process Proposals distributions: p(x) = 1/2, q d (x,v) = 1/n(x) and q b (x,v) = 1/ S. Hastings ratios: r b (x,v) = βγ u x 1[ v u R] S, n(x v) n(x) r d (x,v) = βγ u x\v 1[ v u R] S. What happens if we ignore that γ 1 is required for the Strauss process to exist? 13/14
MCMC in practice Looking at plots of point patterns Y m provides little information whether the chain has converged approximately. Trace plots of various summary statistics can be useful. For example in the case of the Strauss process, n(y m ) and s(y m ) are convenient. Comparing trace plots for Y m started at different Y 0, e.g. empty pattern or Poisson process, can also be useful. Spatstat contains the rmh function for simulating point patterns using the Metropolis-Hastings algorithm. 14/14