Simulate Neyman-Scott Process

Generate a random point pattern, a realisation of the Neyman-Scott cluster process.

spatial, datagen
rNeymanScott(kappa, rmax, rcluster, win = owin(c(0,1),c(0,1)), ..., lmax=NULL)
Intensity of the Poisson process of cluster centres. A single positive number, a function, or a pixel image.
Maximum radius of a random cluster.
A function which generates random clusters, or other data specifying the random cluster mechanism. See Details.
Window in which to simulate the pattern. An object of class "owin" or something acceptable to as.owin.
Arguments passed to rcluster
Optional. Upper bound on the values of kappa when kappa is a function or pixel image.

This algorithm generates a realisation of the general Neyman-Scott process, with the cluster mechanism given by the function rcluster. The clusters must have a finite maximum possible radius rmax.

First, the algorithm generates a Poisson point process of ``parent'' points with intensity kappa. Here kappa may be a single positive number, a function kappa(x, y), or a pixel image object of class "im" (see im.object). See rpoispp for details. Second, each parent point is replaced by a random cluster of points. These clusters are combined together to yield a single point pattern which is then returned as the result of rNeymanScott.

The argument rcluster specifies the cluster mechanism. It may be either:

  • Afunctionwhich will be called to generate each random cluster (the offspring points of each parent point). The function should expect to be called in the formrcluster(x0,y0,...)for a parent point at a location(x0,y0). The return value ofrclustershould specify the coordinates of the points in the cluster; it may be a list containing elementsx,y, or a point pattern (object of class"ppp"). If it is a marked point pattern then the result ofrNeymanScottwill be a marked point pattern.
  • Alist(mu, f)wheremuspecifies the mean number of offspring points in each cluster, andfgenerates the random displacements (vectors pointing from the parent to the offspring). In this case, the number of offspring in a cluster is assumed to have a Poisson distribution, implying that the Neyman-Scott process is also a Cox process. The first elementmushould be either a single nonnegative number (interpreted as the mean of the Poisson distribution of cluster size) or a pixel image or afunction(x,y)giving a spatially varying mean cluster size (interpreted in the sense of Waagepetersen, 2007). The second elementfshould be a function that will be called once in the formf(n)to generatenindependent and identically distributed displacement vectors (i.e. as if there were a cluster of sizenwith a parent at the origin(0,0)). The function should return a point pattern (object of class"ppp") or something acceptable toxy.coordsthat specifies the coordinates ofnpoints.

If required, the intermediate stages of the simulation (the parents and the individual clusters) can also be extracted from the return value of rNeymanScott through the attributes "parents" and "parentid". The attribute "parents" is the point pattern of parent points. The attribute "parentid" is an integer vector specifying the parent for each of the points in the simulated pattern.


  • The simulated point pattern (an object of class "ppp"). Additionally, some intermediate results of the simulation are returned as attributes of this point pattern: see Details.


Neyman, J. and Scott, E.L. (1958) A statistical approach to problems of cosmology. Journal of the Royal Statistical Society, Series B 20, 1--43.

Waagepetersen, R. (2007) An estimating function approach to inference for inhomogeneous Neyman-Scott processes. Biometrics 63, 252--258.

See Also

rpoispp, rThomas, rGaussPoisson, rMatClust, rCauchy, rVarGamma

  • rNeymanScott
# each cluster consist of 10 points in a disc of radius 0.2
  nclust <- function(x0, y0, radius, n) {
              return(runifdisc(n, radius, centre=c(x0, y0)))
  plot(rNeymanScott(10, 0.2, nclust, radius=0.2, n=5))

  # multitype Neyman-Scott process (each cluster is a multitype process)
  nclust2 <- function(x0, y0, radius, n, types=c("a", "b")) {
     X <- runifdisc(n, radius, centre=c(x0, y0))
     M <- sample(types, n, replace=TRUE)
     marks(X) <- M
  plot(rNeymanScott(15,0.1,nclust2, radius=0.1, n=5))
Documentation reproduced from package spatstat, version 1.25-1, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.