rThomas.sphwin: Simulate analogue of the Thomas Process on the sphere

View source: R/rThomas.sphwin.R

rThomas.sphwinR Documentation

Simulate analogue of the Thomas Process on the sphere

Description

Generate a random point pattern using the (homogeneous) Poisson process, or uniform distribution, on a sphere or a subset of a sphere. Includes CSR (complete spatial randomness).

Usage

rThomas.sphwin(kappa, scale, mu, win=sphwin(type="sphere"), parents=FALSE,
 nsim=1, drop=TRUE, expand=TRUE, as.sp=TRUE, ndim="2", poisthresh=1e-06)

Arguments

kappa

Intensity of the Poisson process of cluster centres. A single positive number.

scale

The concentration parameter of the Fisher distribution that is used the generate the daughter points about each cluster centre.

mu

Mean number of points per cluster (a single positive number)

win

Window in which to simulate the pattern. An object of class sphwin.

parents

Logical. If TRUE, the parent points are included in the output, if FALSE parents are not included.

nsim

Number of simulated realisations to be generated.

drop

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

expand

Logical. If TRUE (the default), the process is simulated on the entire sphere, and the output is only those points in the window defined by win. If FALSE, the process is simulated within the window defined by win.

as.sp

Logical. If TRUE, returns an object of class as defined by sp.dim. Otherwise, returns a matrix. See Value.

ndim

A string, taking value "2" or "3". Specifies whether the object should contain the locations of the points in spherical coordinates (ndim="2") or Cartesian coordinates (ndim="3").

poisthresh

Numerical threshold below which the model will be treated as a Poisson process. See Details.

Details

This algorithm generates a realisation of the analogue on the sphere of the (‘modified’) Thomas process, a special case of the Neyman-Scott process, inside the window win.

In this case, kappa and mu are single numbers, and the algorithm generates a uniform Poisson point process of “parent” points with intensity kappa. Then each parent point is replaced by a random cluster of “offspring” points, the number of points per cluster being Poisson (mu) distributed, and their positions being Fisher displacements from the cluster parent location. The resulting point pattern is a realisation of the analogue on the sphere of the classical “stationary Thomas process” generated inside the window win. This point process has intensity kappa * mu.

If the pair correlation function of the model is very close to that of a Poisson process, deviating by less than poisthresh, then the model is approximately a Poisson process, and will be simulated as a Poisson process with intensity kappa * mu, using rpoispp.sphwin. This avoids computations that would otherwise require huge amounts of memory.

Value

If nsim=1 and drop=FALSE then a single item as described below; otherwise a list containing nsim items.

An item is determined by the values of as.sp and ndim:

If as.sp=FALSE and ndim="2", a two column matrix giving the locations of the simulated points.

If as.sp=FALSE and ndim="3", a three column matrix giving the locations of the simulated points.

If as.sp=TRUE and ndim="2", an object of class sp2 giving the locations of the simulated points.

If as.sp=TRUE and ndim="3", an object of class sp3 giving the locations of the simulated points.

Note

This function is the analogue for point processes on the sphere of the function rThomas in spatstat, which is the corresponding function for point processes in R^2. Hence elements of this help page have been taken from that for rThomas with the permission of A. J. Baddeley. This enables the code to be highly efficient and give corresponding output to rThomas, and for the information on this help page to be consistent with that for rThomas. It is hoped that this will minimise or remove any confusion for users of both spatstat and spherstat.

Author(s)

Tom Lawrence <email:tjlawrence@bigpond.com>

References

Diggle, P. J., Besag, J. and Gleaves, J. T. (1976) Statistical analysis of spatial point patterns by means of distance methods. Biometrics 32 659–667.

Lawrence, T.J. (2017) Master's Thesis, University of Western Australia.

Thomas, M. (1949) A generalisation of Poisson's binomial limit for use in ecology. Biometrika 36, 18–25.

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

See Also

rFisher, rHardcore.sphwin, rMatClust.sphwin, rMaternI.sphwin, rMaternII.sphwin, rpoispp.sphwin, rStrauss.sphwin, rThomas

Examples

rT1 <- rThomas.sphwin(250, 25, 5, sphwin(), FALSE)
rT1

baddstats/spherstat documentation built on Feb. 6, 2023, 1:45 a.m.