Learn R Programming

spatstat.core (version 2.3-1)

simulate.mppm: 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 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.

Value

A hyperframe.

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.

See Also

mppm, simulate.ppm.

Examples

Run this code
# NOT RUN {
  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")
# }

Run the code above in your browser using DataLab