simulate.mppm: Simulate a Point Process Model Fitted to Several Point...

View source: R/mppm.R

simulate.mppmR Documentation

Simulate a Point Process Model Fitted to Several Point Patterns

Description

Generates simulated realisations from a point process model that was fitted to several point patterns.

Usage

  ## S3 method for class 'mppm'
simulate(object, nsim=1, ..., verbose=TRUE)

Arguments

object

Point process model fitted to several point patterns. An object of class "mppm".

nsim

Number of simulated realisations (of each original pattern).

...

Further arguments passed to simulate.ppm to control the simulation.

verbose

Logical value indicating whether to print progress reports.

Details

This function is a method for the generic function simulate for the class "mppm" of fitted point process models for replicated point pattern data.

The result is a hyperframe with n rows and nsim columns, where n is the number of original point pattern datasets to which the model was fitted. Each column of the hyperframe contains a simulated version of the original data.

For each of the original point pattern datasets, the fitted model for this dataset is extracted using subfits, then nsim simulated realisations of this model are generated using simulate.ppm, and these are stored in the corresponding row of the output.

Value

A hyperframe.

Author(s)

\spatstatAuthors

.

See Also

mppm, simulate.ppm.

Examples

  H <- hyperframe(Bugs=waterstriders)
  fit <- mppm(Bugs ~ id, H)
  y <- simulate(fit, nsim=2)
  y
  plot(y[1,,drop=TRUE], main="Simulations for Waterstriders pattern 1")
  plot(y[,1,drop=TRUE], main="Simulation 1 for each Waterstriders pattern")

spatstat.core documentation built on May 18, 2022, 9:05 a.m.