Learn R Programming

spatstat (version 1.56-1)

rags: Alternating Gibbs Sampler for Multitype Point Processes

Description

Simulate a realisation of a point process model using the alternating Gibbs sampler.

Usage

rags(model, …, ncycles = 100)

Arguments

model

Data specifying some kind of point process model.

Additional arguments passed to other code.

ncycles

Number of cycles of the alternating Gibbs sampler that should be performed.

Value

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

Details

The Alternating Gibbs Sampler for a multitype point process is an iterative simulation procedure. Each step of the sampler updates the pattern of points of a particular type i, by drawing a realisation from the conditional distribution of points of type i given the points of all other types. Successive steps of the sampler update the points of type 1, then type 2, type 3, and so on.

This is an experimental implementation which currently works only for multitype hard core processes (see MultiHard) in which there is no interaction between points of the same type.

The argument model should be an object describing a point process model. At the moment, the only permitted format for model is of the form list(beta, hradii) where beta gives the first order trend and hradii is the matrix of interaction radii. See ragsMultiHard for full details.

See Also

ragsMultiHard, ragsAreaInter

Examples

Run this code
# NOT RUN {
  mo <- list(beta=c(30, 20),
             hradii = 0.05 * matrix(c(0,1,1,0), 2, 2))
  rags(mo, ncycles=10)
# }

Run the code above in your browser using DataLab