## S3 method for class 'default':
rmh(model, start, control, verbose=TRUE, \dots)
model
."ppp"
, see
ppp.object
). The returned value has an attribute info
containing
modified versions of the arguments
model
, start
, and control
which together specify
the exact simulation procedure.
rmh
.This function executes a Metropolis-Hastings algorithm with birth, death and shift proposals as described in Geyer and Moller (1994).
The argument model
specifies the point process model to be
simulated. It is either a list, or an object of class
"rmhmodel"
, with the following components:
[object Object],[object Object],[object Object],[object Object],[object Object]
For full details of these parameters, see rmhmodel
.
The argument start
determines the initial state of the
Metropolis-Hastings algorithm. It is either a list, or an object
of class "rmhstart"
, with the following components:
[object Object],[object Object],[object Object]
For full details of these parameters, see rmhstart
.
The third argument control
controls the simulation
procedure, iterative behaviour, and termination of the
Metropolis-Hastings algorithm. It is either a list, or an
object of class "rmhcontrol"
, with components:
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
For full details of these parameters, see rmhcontrol
.
It is possible to simulate the model conditionally upon the number of
points, or in the case of multitype processes, upon the number of
points of each type. To condition upon the total number of points,
set control$p
(the probability of a shift) equal to 1.
The number of points is then determined by the starting state, which
may be specified either by setting start$n.start
to be a
scalar, or by setting the initial pattern start$x.start
.
To condition upon the
number of points of each type, set control$p
equal to 1
and control$fixall
to be TRUE
.
The number of points is then determined by the starting state, which
may be specified either by setting start$n.start
to be an
integer vector, or by setting the initial pattern start$x.start
.
When we simulate conditionally, no expansion of the window is possible.
Diggle, P. J. (2003) Statistical Analysis of Spatial Point Patterns (2nd ed.) Arnold, London.
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.
Diggle, P.J., Gates, D.J., and Stibbard, A. (1987) A nonparametric estimator for pairwise-interaction point processes. Biometrika 74, 763 -- 770.
Geyer, C.J. and M{
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. }
There is never a guarantee that the Metropolis-Hastings algorithm has converged to its limiting distribution.
If start$x.start
is specified then expand
is set equal to 1
and simulation takes place in x.start$window
. Any specified
value for expand
is simply ignored.
The presence of both a component w
of model
and a
non-null value for x.start$window
makes sense ONLY if w
is contained in x.start$window
.
For multitype processes make sure that, even if there is to be no trend corresponding to a particular type, there is still a component (a NULL component) for that type, in the list. }
rmh
,
rmh.ppm
,
rStrauss
,
ppp
,
ppm
,
Strauss
,
Softcore
,
StraussHard
,
MultiStrauss
,
MultiStraussHard
,
DiggleGratton
model$cif
matches the name of a Fortran
subroutine which calculates the conditional intensity function
for the model. It is intended that more options will be
added in the future. The very brave user could try
to add her own. Note that in addition to writing Fortran
code for the new conditional intensity function, the user
would have to modify the code in the files cif.f
and
rmh.default.R
appropriately. (And of course re-install
the spatstat.so
.)
Note that the lookup
conditional intensity function
permits the simulation (in theory, to any desired degree
of approximation) of any pairwise interaction process for
which the interaction depends only on the distance between
the pair of points.
}
# Lookup (interaction function h_2 from page 76, Diggle (2003)):
r <- seq(from=0,to=0.2,length=101)[-1] # Drop 0.
h <- 20*(r-0.05)
h[r<0.05] 0="" <-="" h[r="">0.10] <- 1
mod17 <- list(cif="lookup",par=list(beta=4000,h=h,r=r),w=c(0,1,0,1))
X.lookup <- rmh(model=mod17,start=list(n.start=100),
control=list(nrep=nr,nverb=nv))
# Strauss with trend
tr <- function(x,y){x <- x/250; y <- y/250;
exp((6*x + 5*y - 18*x^2 + 12*x*y - 9*y^2)/6)
}
beta <- 0.3
gmma <- 0.5
r <- 45
mod17 <- list(cif="strauss",par=c(beta=beta,gamma=gmma,r=r),w=c(0,250,0,250),
trend=tr3)
X1.strauss.trend <- rmh(model=mod17,start=list(n.start=90),
control=list(nrep=nr,nverb=nv))
[object Object],[object Object]