simulate.slrm {spatstat.model} | R Documentation |
Simulate a Fitted Spatial Logistic Regression Model
Description
Generates simulated realisations from a fitted spatial logistic regresson model
Usage
## S3 method for class 'slrm'
simulate(object, nsim = 1, seed=NULL, ...,
window=NULL, covariates=NULL, verbose=TRUE, drop=FALSE)
Arguments
object |
Fitted spatial logistic regression model. An object of class |
nsim |
Number of simulated realisations. |
seed |
an object specifying whether and how to initialise
the random number generator. Either |
... |
Ignored. |
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 |
drop |
Logical. If |
Details
This function is a method for the generic function
simulate
for the class "slrm"
of fitted
spatial logistic regression models.
Simulations are performed by rpoispp
after the intensity has been computed by predict.slrm
.
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
.
Value
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.
Author(s)
Adrian Baddeley Adrian.Baddeley@curtin.edu.au and Rolf Turner rolfturner@posteo.net
See Also
slrm
,
rpoispp
,
simulate.ppm
,
simulate.kppm
,
simulate
Examples
X <- copper$SouthPoints
fit <- slrm(X ~ 1)
simulate(fit, 2)
fitxy <- slrm(X ~ x+y)
simulate(fitxy, 2, window=square(2))