View source: R/rThomas.sphwin.R
rThomas.sphwin | R Documentation |
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).
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)
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 |
parents |
Logical. If |
nsim |
Number of simulated realisations to be generated. |
drop |
Logical. If |
expand |
Logical. If |
as.sp |
Logical. If |
ndim |
A string, taking value |
poisthresh |
Numerical threshold below which the model will be treated as a Poisson process. See 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.
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.
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.
Tom Lawrence <email:tjlawrence@bigpond.com>
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.
rFisher
, rHardcore.sphwin
,
rMatClust.sphwin
, rMaternI.sphwin
,
rMaternII.sphwin
, rpoispp.sphwin
,
rStrauss.sphwin
, rThomas
rT1 <- rThomas.sphwin(250, 25, 5, sphwin(), FALSE) rT1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.