"rmhmodel"(model, w, ..., verbose=TRUE, project=TRUE, control=rmhcontrol(), new.coef=NULL)
"ppm"
).
rmhcontrol
.
coef(model)
.
"rmhmodel"
, which is essentially
a list of parameter values for the model.There is a print
method for this class, which prints
a sensible description of the model chosen.
rmhmodel
takes a
description of a point process model in some format, and
converts it into an object of class "rmhmodel"
so that simulations of the model can be generated using
the Metropolis-Hastings algorithm rmh
.
This function rmhmodel.ppm
is the method for
the class "ppm"
of fitted point process models. The argument model
should be a fitted point process model
(object of class "ppm"
) typically obtained from the
model-fitting function ppm
.
This will be converted into an object of class "rmhmodel"
.
The optional argument w
specifies the window
in which the pattern is to be generated. If specified, it must be in
a form which can be coerced to an object of class owin
by as.owin
.
Not all fitted point process models
obtained from ppm
can be simulated.
We have not yet implemented simulation code for
the LennardJones
and OrdThresh
models.
It is also possible that a fitted point process model
obtained from ppm
may not correspond to a valid
point process. For example a fitted model with the Strauss
interpoint interaction may have any value of the interaction parameter
$gamma$; however the Strauss
process is not well-defined for
$gamma > 1$ (Kelly and Ripley, 1976).
The argument project
determines what to do in such cases.
If project=FALSE
, a fatal error will occur.
If project=TRUE
, the fitted model parameters will be
adjusted to the nearest values which do correspond to a valid
point process. For example a Strauss process with $gamma > 1$ will be projected to a Strauss process with
$gamma = 1$, equivalent to a Poisson process.
Diggle, P.J. and Gratton, R.J. (1984) Monte Carlo methods of inference for implicit statistical models. Journal of the Royal Statistical Society, series B 46, 193 -- 212.
Geyer, C.J. (1999) Likelihood Inference for Spatial Point Processes. Chapter 3 in O.E. Barndorff-Nielsen, W.S. Kendall and M.N.M. Van Lieshout (eds) Stochastic Geometry: Likelihood and Computation, Chapman and Hall / CRC, Monographs on Statistics and Applied Probability, number 80. Pages 79--140.
Kelly, F.P. and Ripley, B.D. (1976) On Strauss's model for clustering. Biometrika 63, 357--360.
rmhmodel
,
rmhmodel.list
,
rmhmodel.default
,
rmh
,
rmhcontrol
,
rmhstart
,
ppm
,
\rmhInteractionsList.
fit1 <- ppm(cells ~1, Strauss(0.07))
mod1 <- rmhmodel(fit1)
fit2 <- ppm(cells ~x, Geyer(0.07, 2))
mod2 <- rmhmodel(fit2)
fit3 <- ppm(cells ~x, Hardcore(0.07))
mod3 <- rmhmodel(fit3)
# Then rmh(mod1), etc
Run the code above in your browser using DataLab