rStrauss.sphwin: Simulation of the Strauss Process

View source: R/rStrauss.sphwin.R

rStrauss.sphwinR Documentation

Simulation of the Strauss Process

Description

Generate a random pattern of points, a simulated realisation of the Strauss process, using the Metropolis-Hastings simulation algorithm.

Usage

rStrauss.sphwin(beta, gamma, R=0, p=0.5, m=100, win = sphwin(type="sphere"),
 nsim=1, drop=TRUE, expand=TRUE, as.sp=TRUE, ndim="2")

Arguments

beta

intensity parameter (a positive number).

gamma

interaction strength parameter (a number between 0 and 1, inclusive).

R

interaction range parameter (a number between 0 and pi*rho, inclusive, where rho is the radius of the sphere that to simulate the point pattern on).

p

Metropolis-Hastings parameter: The conditional probability of proposing a birth given that a birth or death is proposed.

m

Metropolis-Hastings parameter: The number of proposals that should be run.

win

The window, an object of type sphwin.

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

Details

rStrauss.sp2 uses the Metropolis Hastings algorithm to generate a realisation of a Strauss process inside the window win.

The Strauss process (Strauss, 1975; Kelly and Ripley, 1976) is a model for spatial inhibition, ranging from a strong ‘hard core’ inhibition to a completely random pattern according to the value of gamma.

The Strauss process with interaction radius R and parameters beta and gamma is the pairwise interaction point process with probability density

f(x[1], ..., x[n]) = alpha * beta^(n(x)) * gamma^(s(x))

where x[1], ..., x[n] represent the points of the pattern, n(x) is the number of points in the pattern, s(x) is the number of distinct unordered pairs of points that are closer than R units apart, and alpha is the normalising constant. Intuitively, each point of the pattern contributes a factor beta to the probability density, and each pair of points closer than r units apart contributes a factor gamma to the density.

The interaction parameter gamma must be less than or equal to 1 in order that the process be well-defined (Kelly and Ripley, 1976). This model describes an “ordered” or “inhibitive” pattern. If gamma=1 it reduces to a homogeneous spherical Poisson process (complete spatial randomness) with intensity beta. If gamma=0 it is called a “hard core process” with hard core radius R/2, since no pair of points is permitted to lie closer than R units apart.

If gamma=1, a warning message will appear to advise that the generated process is a hard-core process, but the process well generate as normal. The function rHardcore.sphwin generates the same process but without the warning message. It is recommended that rpoispp.sphwin be used to generate a homogeneous Poisson process in preference to this function with gamma=0 on the basis that the former uses a more efficient algorithm.

The Metropolis-Hastings algorithm is a Markov Chain, whose states are spatial point patterns, and whose limiting distribution is the desired point process. After running the algorithm for a very large number of iterations, we may regard the state of the algorithm as a realisation from the desired point process.

However, there are difficulties in deciding whether the algorithm has run for “long enough”. The convergence of the algorithm may indeed be extremely slow. No guarantees of convergence are given!

While it is fashionable to decry the Metropolis-Hastings algorithm for its poor convergence and other properties, it has the advantage of being easy to implement for a wide range of models.

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 rmh in spatstat when used in the first example in rmh.default, which is the corresponding function for point processes in R^2. Hence elements of this help pages have been taken from those for rmh and rStrauss (also in spatstat), with the permission of A. J. Baddeley. This enables the code to be highly efficient and give corresponding output to rmh, and for the information on this help page to be consistent with that for rmh and rStrauss. 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

Kelly, F.P. and Ripley, B.D. (1976) On Strauss's model for clustering. Biometrika 64, 357–360.

Strauss, D.J. (1975) A model for clustering. Biometrika 63, 467-475.

See Also

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

Examples

rS1 <- rStrauss.sphwin(beta=5, gamma=0.5, R=0.04*pi, p=0.5, m=100, win=sphwin())
rS1

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