# rmhcontrol

##### Set Control Parameters for Metropolis-Hastings Algorithm.

Sets up a list of parameters controlling the iterative behaviour of the Metropolis-Hastings algorithm.

##### Usage

```
rmhcontrol(...)
## S3 method for class 'default':
rmhcontrol(\dots, p=0.9, q=0.5, nrep=5e5,
expand=NULL, periodic=FALSE, ptypes=NULL,
x.cond=NULL, fixall=FALSE, nverb=0)
```

##### Arguments

- ...
- Arguments passed to methods.
- p
- Probability of proposing a shift (as against a birth/death)
- q
- Conditional probability of proposing a death given that a birth or death will be proposed
- nrep
- Total number of steps (proposals) of Metropolis-Hastings algorithm that should be run
- expand
- Either a numerical expansion factor,
or a window (object of class
`"owin"`

), specifying that simulations are to be performed in a domain larger than the original data window, then clipped to the original data window. - periodic
- (Logical) whether to simulate ``periodically'', i.e. on a torus formed by identifying opposite edges of a rectangle.
- ptypes
- For multitype point processes, the distribution of the mark attached to a new random point (when a birth is proposed)
- x.cond
- Conditioning points for conditional simulation.
- fixall
- (Logical) for multitype point processes, whether to fix the number of points of each type.
- nverb
- Progress reports will be printed every
`nverb`

iterations

##### Details

The Metropolis-Hastings algorithm, implemented as `rmh`

,
generates simulated realisations of point process models.
This function `rmhcontrol`

sets up a list of parameters which control the
iterative behaviour
and termination of the Metropolis-Hastings algorithm, for use in a
subsequent call to `rmh`

. It also checks that the
parameters are valid.

(A separate function `rmhstart`

determines the initial state of the algorithm,
and `rmhmodel`

determines the model to be simulated.)

The parameters are as follows: [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

##### Value

- An object of class
`"rmhcontrol"`

, which is essentially a list of parameter values for the algorithm. There is a`print`

method for this class, which prints a sensible description of the parameters chosen.

##### References

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.

##### See Also

##### Examples

```
# parameters given as named arguments
c1 <- rmhcontrol(p=0.3,periodic=TRUE,nrep=1e6,nverb=1e5)
# parameters given as a list
liz <- list(p=0.9, nrep=1e4)
c2 <- rmhcontrol(liz)
# parameters given in rmhcontrol object
c3 <- rmhcontrol(c1)
```

*Documentation reproduced from package spatstat, version 1.17-1, License: GPL (>= 2)*