simulate.dppm: Simulation of Determinantal Point Process Model

simulate.dppmR Documentation

Simulation of Determinantal Point Process Model

Description

Generates simulated realisations from a determinantal point process model.

Usage

  ## S3 method for class 'dppm'
simulate(object, nsim = 1, seed = NULL, ...,
    W = NULL, trunc = 0.99, correction = "periodic", rbord = reach(object))

  ## S3 method for class 'detpointprocfamily'
simulate(object, nsim = 1, seed = NULL, ...,
    W = NULL, trunc = 0.99, correction = "periodic", rbord = reach(object))

Arguments

object

Determinantal point process model. An object of class "detpointprocfamily" or "dppm".

nsim

Number of simulated realisations.

seed

an object specifying whether and how to initialise the random number generator. Either NULL or an integer that will be used in a call to set.seed before simulating the point patterns.

...

Arguments passed on to rdpp.

W

Object specifying the window of simulation (defaults to a unit box if nothing else is sensible – see Details). Can be any single argument acceptable to as.boxx (e.g. an "owin", "box3" or "boxx" object).

trunc

Numeric value specifying how the model truncation is preformed. See Details.

correction

Character string specifying the type of correction to use. The options are "periodic" (default) and "border". See Details.

rbord

Numeric value specifying the extent of the border correction if this correction is used. See Details.

Details

These functions are methods for the generic function simulate for the classes "detpointprocfamily" and "dppm" of determinantal point process models.

The return value is a list of nsim point patterns. It also carries an attribute "seed" that captures the initial state of the random number generator. This follows the convention used in simulate.lm (see simulate). It can be used to force a sequence of simulations to be repeated exactly, as shown in the examples for simulate.

The exact simulation of a determinantal point process model involves an infinite series, which typically has no analytical solution. In the implementation a truncation is performed. The truncation trunc can be specified either directly as a positive integer or as a fraction between 0 and 1. In the latter case the truncation is chosen such that the expected number of points in a simulation is trunc times the theoretical expected number of points in the model. The default is 0.99.

The window of the returned point pattern(s) can be specified via the argument W. For a fitted model (of class "dppm") it defaults to the observation window of the data used to fit the model. For inhomogeneous models it defaults to the window of the intensity image. Otherwise it defaults to a unit box. For non-rectangular windows simulation is done in the containing rectangle and then restricted to the window. For inhomogeneous models a stationary model is first simulated using the maximum intensity and then the result is obtained by thinning.

The default is to use periodic edge correction for simulation such that opposite edges are glued together. If border correction is used then the simulation is done in an extended window. Edge effects are theoretically completely removed by doubling the size of the window in each spatial dimension, but for practical purposes much less extension may be sufficient. The numeric rbord determines the extent of the extra space added to the window.

Value

A list of length nsim containing simulated point patterns. If the patterns are two-dimensional, then they are objects of class "ppp", and the list has class "solist". Otherwise, the patterns are objects of class "ppx" and the list has class "anylist".

The return value also carries an attribute "seed" that captures the initial state of the random number generator. See Details.

Author(s)

\spatstatAuthors

.

References

Lavancier, F. \Moller, J. and Rubak, E. (2015) Determinantal point process models and statistical inference Journal of the Royal Statistical Society, Series B 77, 853–977.

See Also

rdpp, simulate

Examples

if(interactive()) {
   nsim <- 2
   lam <- 100
} else {
   nsim <- 1
   lam <- 30
}
model <- dppGauss(lambda=lam, alpha=.05, d=2)
simulate(model, nsim)

spatstat.model documentation built on Sept. 30, 2024, 9:26 a.m.