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 "Thomas", "MatClust", "Cauchy" and "VarGamma".

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 "owin".

nsim

The number of simulated point patterns to be generated. A positive integer.

drop

Logical value. If nsim=1 and drop=TRUE (the default), the result will be a point pattern, rather than a list containing a point pattern.

best

Logical value. If best=TRUE, the code will choose the fastest algorithm. If best=FALSE (the default), the algorithm will be specified by the other arguments external and internal. See Details.

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.inverse=TRUE, the default) or by numerical root-finding (use.inverse=FALSE). This is mainly for checking validity of code.

use.special

Logical value specifying whether to use efficient special code (if available) to generate the simulations (use.special=TRUE, the default) or to use generic code (use.special=FALSE). This is mainly for checking validity of code.

integralmethod

Character string (partially matched) specifying how to perform numerical computation of integrals when required. This argument is passed to indefinteg. The default integralmethod="quadrature" is accurate but can be slow. Faster, but possibly less accurate, integration can be performed by setting integralmethod="trapezoid".

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:

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.

The argument internal determines the algorithm for generating proposed parent points inside E.

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)

[Package spatstat.random version 3.3-1 Index]