rMaternI.sphwin: Simulate Matern Model I

View source: R/rMaternI.sphwin.R

rMaternI.sphwinR Documentation

Simulate Matern Model I

Description

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

Usage

rMaternI.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.

stationary

Logical. Whether to start with a stationary process of proposal points over the entire sphere (stationary=TRUE) or to generate the proposal points only inside the window (stationary=FALSE).

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.

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 I 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 retained. The remaining proposal points are tested one at a time, and only accepted if the minimum great circle distance between it and the pattern of already accepted proposal points is greater than great circle distance r.

The final pattern of retained points constitute Matern's Model I.

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 rMaternI in spatstat. Hence elements of this help page have been taken from that for rMaternI, with the permission of A. J. Baddeley. This enables the information on this help page to be consistent with that forrMaternI. 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. (2017) Master's Thesis, University of Western Australia.

See Also

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

Examples

rM1 <- rMaternI.sphwin(kappa=3, r=pi/30, win=sphwin())
rM1

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