simulate.mppm {spatstat} | R Documentation |
Generates simulated realisations from a point process model that was fitted to several point patterns.
## S3 method for class 'mppm' simulate(object, nsim=1, ..., verbose=TRUE)
object |
Point process model fitted to several point patterns.
An object of class |
nsim |
Number of simulated realisations (of each original pattern). |
... |
Further arguments passed to |
verbose |
Logical value indicating whether to print progress reports. |
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.
A hyperframe.
Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner r.turner@auckland.ac.nz and Ege Rubak rubak@math.aau.dk.
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")