rMaternII.sphwin: Simulate Matern Model II

View source: R/rMaternII.sphwin.R

rMaternII.sphwinR Documentation

Simulate Matern Model II

Description

Generate a random point pattern, a simulated realisation of the Matern Model II inhibition process model.

Usage

rMaternII.sphwin(kappa, r, win = sphwin(type="sphere"), nsim=1, drop=TRUE,
 stationary=TRUE, as.sp=TRUE, ndim="2")

Arguments

kappa

Intensity of the Poisson process of proposal points (a positive number).

r

Inhibition distance

win

The window in which to simulate the pattern, 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.

stationary

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

This algorithm generates a realisation of Matern's Model II inhibition process inside the window win. First, a simulated stationary Poisson process with intensity kappa is generated. The number of proposal points will equal the number of points in this pattern; the original pattern is ignored after this step.

The simulated pattern is comprised of proposal points. The first proposal point is automatically provisionally retained. The remaining proposal points are tested one at a time. If a proposal point occurs within great circle distance r of any existing provisionally retained points, those points are deleted and the proposal point rejected. Otherwise, the proposal point is provisionally retained.

Once all the proposal points have been tested, the final pattern of retained points constitute Matern's Model II.

The process is constructed by first generating a uniform Poisson point process of "proposal" points with intensity kappa. If stationary = TRUE (the default), the proposal points are generated on the entire sphere; this is relevant when there may be points outside the window, as these would affect whether points inside the window are retained in the final model. If stationary=FALSE then the proposal points are only generated inside the window win; this is relevant when it is known or assumed that there are no points outside the window.

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 rMaternII in spatstat for point processes in R^2. Hence elements of this help page have been taken from that for rMaternII, with the permission of A. J. Baddeley. This enables the information on this help page to be consistent with that forrMaternII. 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

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

See Also

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

Examples

rM2 <- rMaternII.sphwin(kappa=5, r=pi/20, win=sphwin())
rM2

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