rags | R Documentation |
Simulate a realisation of a point process model using the alternating Gibbs sampler.
rags(model, ..., ncycles = 100)
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. |
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.
A point pattern (object of class "ppp"
).
ragsMultiHard
,
ragsAreaInter
mo <- list(beta=c(30, 20),
hradii = 0.05 * matrix(c(0,1,1,0), 2, 2))
rags(mo, ncycles=10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.