simulate.sphppm: Simulate Realisations of a Fitted Point Process Model on...

View source: R/sphppm.R

simulate.sphppmR Documentation

Simulate Realisations of a Fitted Point Process Model on Sphere

Description

Given a point process model fitted to spherical point pattern data, this function generates one or more simulated realisations of the model.

Usage

## S3 method for class 'sphppm'
simulate(object, nsim = 1, ..., win, drop = TRUE)

Arguments

object

The fitted model. An object of class "sphppm" usually obtained from sphppm.

win

The window in which to generate the simulated realisations. An object of class "sphwin". Default is the window for the data to which the model was originally fitted.

nsim

Number of simulations. Integer.

...

Ignored.

drop

Logical. If nsim=1 and drop=TRUE, the result will be a point pattern, rather than a list containing a point pattern.

Details

This is the method for the generic function simulate for the class "sphppm" of fitted point process models on a sphere.

Simulated realisations of the model are generated using rpoispp.sphwin, using predict.sphppm to evaluate the intensity function.

Value

If nsim=1 and drop=TRUE (the defaults), a spherical point pattern (object of class "sp2"). Otherwise, a list of point patterns.

Author(s)

Adrian Baddeley.

See Also

sphppm, rpoispp.sphwin

Examples

   W <- sphwin(type="band", param=c(pi/3, 2*pi/3), ref=c(0,0))
   Z <- runif.sphwin(100, W)
   fut <- sphppm(Z ~ x1 + x2 + x3)
   simulate(fut, 2)

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