simulate.kppm {spatstat} | R Documentation |
Generates simulated realisations from a fitted cluster point process model.
## S3 method for class 'kppm' simulate(object, nsim = 1, seed=NULL, ..., window=NULL, covariates=NULL, verbose=TRUE, retry=10, drop=FALSE)
object |
Fitted cluster point process model. An object of class |
nsim |
Number of simulated realisations. |
seed |
an object specifying whether and how to initialise
the random number generator. Either |
... |
Additional arguments passed to the relevant random generator. See Details. |
window |
Optional. Window (object of class |
covariates |
Optional. A named list containing new values for the covariates in the model. |
verbose |
Logical. Whether to print progress reports (when |
retry |
Number of times to repeat the simulation if it fails (e.g. because of insufficient memory). |
drop |
Logical. If |
This function is a method for the generic function
simulate
for the class "kppm"
of fitted
cluster point process models.
Simulations are performed by
rThomas
,
rMatClust
,
rCauchy
,
rVarGamma
or rLGCP
depending on the model.
Additional arguments ...
are passed to the relevant function
performing the simulation.
For example the argument saveLambda
is recognised by all of the
simulation functions.
The return value is a list of 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
.
A list of length nsim
containing simulated point patterns
(objects of class "ppp"
).
The return value also carries an attribute "seed"
that
captures the initial state of the random number generator.
See Details.
Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner r.turner@auckland.ac.nz and Ege Rubak rubak@math.aau.dk
kppm
,
rThomas
,
rMatClust
,
rCauchy
,
rVarGamma
,
rLGCP
,
simulate.ppm
,
simulate
fit <- kppm(redwood ~1, "Thomas") simulate(fit, 2) fitx <- kppm(redwood ~x, "Thomas") simulate(fitx, 2)