rclusterBKBC {spatstat.random} | R Documentation |
Simulate Cluster Process using Brix-Kendall Algorithm or Modifications
Description
Generates simulated realisations of a stationary Neyman-Scott cluster point process, using the Brix-Kendall (2002) algorithm or various modifications proposed by Baddeley and Chang (2023). For advanced research use.
Usage
rclusterBKBC(clusters="Thomas",
kappa, mu, scale,
...,
W = unit.square(),
nsim = 1, drop = TRUE,
best = FALSE,
external = c("BK", "superBK", "border"),
internal = c("dominating", "naive"),
inflate = 1,
psmall = 1e-04,
use.inverse=TRUE,
use.special=TRUE,
integralmethod=c("quadrature", "trapezoid"),
verbose = TRUE, warn=TRUE)
Arguments
clusters |
Character string (partially matched) specifying the cluster process.
Current options include |
kappa |
Intensity of the parent process. A nonnegative number. |
mu |
Mean number of offspring per parent. A nonnegative number. |
scale |
Cluster scale. Interpretation depends on the model. |
... |
Additional arguments controlling the shape of the cluster kernel, if any. |
W |
Window in which the simulation should be generated.
An object of class |
nsim |
The number of simulated point patterns to be generated. A positive integer. |
drop |
Logical value. If |
best |
Logical value. If |
external |
Algorithm to be used to generate parent points which lie outside the bounding window. See Details. |
internal |
Algorithm to be used to generate parent points which lie inside the bounding window. See Details. |
inflate |
Numerical value determining the position of the bounding window. See Details. |
psmall |
Threshold of small probability for use in the algorithm. |
use.inverse |
Logical value specifying whether to compute the inverse function
analytically, if possible ( |
use.special |
Logical value specifying whether to use efficient special code
(if available) to generate the simulations ( |
integralmethod |
Character string (partially matched)
specifying how to perform numerical computation of integrals
when required. This argument is passed to
|
verbose |
Logical value specifying whether to print detailed information about the simulation algorithm during execution. |
warn |
Logical value specifying whether to issue a warning if the number of random proposal points is very large. |
Details
This function is intended for advanced research use.
It implements the algorithm of Brix and Kendall (2002)
for generating simulated realisations of a stationary Neyman-Scott
process, and various modifications of this algorithm proposed
in Baddeley and Chang (2023).
It is an alternative to rNeymanScott
.
The function supports the following models:
-
clusters="Thomas"
: the (modified) Thomas cluster process which can also be simulated byrThomas
. -
clusters="MatClust"
: the Matern cluster process which can also be simulated byrMatClust
. -
clusters="Cauchy"
: the Cauchy cluster process which can also be simulated byrCauchy
. -
clusters="VarGamma"
: the variance-gamma cluster process which can also be simulated byrVarGamma
. -
any other Poisson cluster process models that may be recognised by
kppm
.
By default, the code executes the original Brix-Kendall algorithm described in Sections 2.3 and 3.1 of Brix and Kendall (2002).
Modifications of this algorithm, proposed in Baddeley and Chang
(2023), can be selected using the
arguments external
and internal
, or best
.
If best=TRUE
, the code will choose the algorithm
that would run fastest with the given parameters.
If best=FALSE
(the default), the choice of algorithm
is determined by the arguments external
and internal
.
First the window W
is enclosed in a disc D
and Monte Carlo proposal densities are defined with reference to D
as described in Brix and Kendall (2002).
Then D
is inflated by the scale factor inflate
to produce a larger disc E
(by default inflate=1
implying E=D
).
Then the parent points of the clusters are generated, possibly
using different mechanisms inside and outside E
.
The argument external
determines the algorithm for generating
parent points outside E
.
-
If
external="BK"
(the default), proposed parents outsideE
will be generated from a dominating point process as described in Section 3.1 of Brix and Kendall (2002). These points will be thinned to obtain the correct intensity of parent points. For each accepted parent, offspring points are generated insideD
, subject to the condition that the parent has at least one offspring insideD
. Offspring points are subsequently clipped to the true windowW
. -
If
external="superBK"
, proposed parents will initially be generated from a process that dominates the dominating point process as described in Baddeley and Chang (2023). These proposals will then be thinned to obtain the correct intensity of the dominating process, then thinned again to obtain the correct intensity of parent points. This procedure reduces computation time whenscale
is large. For each accepted parent, offspring points are generated insideD
, subject to the condition that the parent has at least one offspring insideD
. Offspring points are subsequently clipped to the true windowW
. -
If
external="border"
then proposed parents will be generated with uniform intensity in a border region surrounding the discD
. For each proposed parent, offspring points are generated in the entire plane according to the cluster offspring distribution, without any restriction. Offspring points are subsequently clipped to the true windowW
. This is the technique currently used inrNeymanScott
.
The argument internal
determines the algorithm for generating
proposed parent points inside E
.
-
If
internal="dominating"
, parent points inE
are generated according to the dominating point process described in Sections 2.3 and 3.1 of Brix and Kendall (2002), and then thinned to obtain the correct intensity of parent points. For each accepted parent, offspring points are generated insideD
, subject to the condition that the parent has at least one offspring insideD
. Offspring points are subsequently clipped to the true windowW
. -
If
internal="naive"
, parent points inE
are generated with uniform intensity insideE
and are not thinned. For each proposed parent, offspring points are generated in the entire plane according to the cluster offspring distribution, without any restriction. Offspring points are subsequently clipped to the true windowW
. This is the technique currently used inrNeymanScott
.
If warn=TRUE
, then a warning will be issued if
the number of random proposal points (proposed parents and proposed
offspring) is very large.
The threshold is spatstat.options("huge.npoints")
.
This warning has no consequences,
but it helps to trap a number of common problems.
Value
A point pattern, or a list of point patterns.
If nsim=1
and drop=TRUE
, the result is
a point pattern (an object of class "ppp"
).
Otherwise, the result is a list of nsim
point patterns,
and also belongs to the class "solist"
.
Author(s)
Adrian Baddeley Adrian.Baddeley@curtin.edu.au and Ya-Mei Chang yamei628@gmail.com.
References
Baddeley, A. and Chang, Y.-M. (2023) Robust algorithms for simulating cluster point processes. Journal of Statistical Computation and Simulation. In Press. DOI 10.1080/00949655.2023.2166045
.
Brix, A. and Kendall, W.S. (2002) Simulation of cluster point processes without edge effects. Advances in Applied Probability 34, 267–280.
See Also
rNeymanScott
,
rMatClust
,
rThomas
,
rCauchy
,
rVarGamma
Examples
Y <- rclusterBKBC("Thomas", 10,5,0.2)
Y
Z <- rclusterBKBC("VarGamma", 10,5,0.2,
nu=-1/4,
internal="naive", external="super",
verbose=FALSE)