"simulate"(object, nsim=1, ..., singlerun = FALSE, start = NULL, control = default.rmhcontrol(object, w=w), w = NULL, project=TRUE, new.coef=NULL, verbose=FALSE, progress=(nsim > 1), drop=FALSE)"ppm".
singlerun=TRUE) or from separate, independent runs of the
algorithm (singlerun=FALSE, the default).
rmhstart for description of these arguments.
Defaults to list(n.start=npoints(data.ppm(object)))
meaning that the initial state of the algorithm
has the same number of points as the original dataset.
rmhcontrol
for description of these arguments.
"owin".
rmhcontrol,
or to rmh.default, or to covariate functions in the model.
project=TRUE the closest valid model will be simulated;
if project=FALSE an error will occur.
rmh.ppm
during the simulation of each point pattern.
coef(object).
nsim=1 and drop=TRUE, the
result will be a point pattern, rather than a list
containing a point pattern.
nsim containing simulated point patterns
(objects of class "ppp").
It also belongs to the class "solist", so that it can be
plotted, and the class "timed", so that the total computation
time is recorded.
simulate for the class "ppm" of fitted
point process models.
Simulations are performed by rmh.ppm. If singlerun=FALSE (the default), the simulated patterns are
the results of independent runs of the Metropolis-Hastings
algorithm. If singlerun=TRUE, a single long run of the
algorithm is performed, and the state of the simulation is saved
every nsave iterations to yield the simulated patterns.
In the case of a single run, the behaviour is controlled
by the parameters nsave,nburn,nrep. These
are described in rmhcontrol. They may be passed
in the ... arguments or included in control.
It is sufficient to specify two
of the three parameters nsave,nburn,nrep.
ppm,
simulate.kppm,
simulate
fit <- ppm(japanesepines, ~1, Strauss(0.1))
simulate(fit, 2)
simulate(fit, 2, singlerun=TRUE, nsave=1e4, nburn=1e4)
Run the code above in your browser using DataLab