ragsMultiHard | R Documentation |
Generate a realisation of the multitype hard core point process using the alternating Gibbs sampler.
ragsMultiHard(beta, hradii, ..., types=NULL, bmax = NULL,
periodic=FALSE, ncycles = 100)
beta |
First order trend. A numeric vector, a pixel image, a function, a list of functions, or a list of pixel images. |
hradii |
Matrix of hard core radii between each pair of types.
Diagonal entries should be |
types |
Vector of all possible types for the multitype point pattern. |
... |
Arguments passed to |
bmax |
Optional upper bound on |
periodic |
Logical value indicating whether to measure distances in the periodic sense, so that opposite sides of the (rectangular) window are treated as identical. |
ncycles |
Number of cycles of the sampler to 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,
and for the area-interaction process (see ragsAreaInter
).
The argument beta
gives the first order trend for
each possible type of point. It may be a single number, a numeric
vector, a function(x,y)
, a pixel image, a list of functions,
a function(x,y,m)
, or a list of pixel images.
The argument hradii
is the matrix of hard core radii
between each pair of possible types of points. Two points of types
i
and j
respectively are forbidden to lie closer than
a distance hradii[i,j]
apart. The diagonal of this matrix must
contain NA
or 0
values, indicating that there is no hard
core constraint applying between points of the same type.
A point pattern (object of class "ppp"
).
rags
,
ragsAreaInter
b <- c(30,20)
h <- 0.05 * matrix(c(0,1,1,0), 2, 2)
ragsMultiHard(b, h, ncycles=10)
ragsMultiHard(b, h, ncycles=5, periodic=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.