rmhstart
Determine Initial State for Metropolis-Hastings Simulation.
Builds a description of the initial state for the Metropolis-Hastings algorithm.
Usage
rmhstart(start, ...)
## S3 method for class 'default':
rmhstart(start=NULL, \dots, n.start=NULL, x.start=NULL, iseed)
Arguments
- start
- An existing description of the initial state in some format. Incompatible with the arguments listed below.
- ...
- There should be no other arguments.
- n.start
- Number of initial points (to be randomly generated).
Incompatible with
x.start
. - x.start
- Initial point pattern configuration.
Incompatible with
n.start
. - iseed
- Vector of 3 integers determining the initial state of the random number generator. This argument should not be specified, in normal use.
Details
Simulated realisations of many point process models
can be generated using the Metropolis-Hastings algorithm
implemented in rmh
.
This function rmhstart
creates a full description of the initial state of the
Metropolis-Hastings algorithm,
including possibly the initial state of the random number generator,
for use in a subsequent call to rmh
. It also
checks that the initial state is valid.
The initial state should be specified either by the
first argument start
or by the other arguments
n.start
, x.start
etc.
If start
is a list, then it should have components named
n.start
or x.start
and optionally iseed
,
with the same interpretation as described below.
The arguments are:
[object Object],[object Object],[object Object]
The parameters n.start
and x.start
are
incompatible.
Value
- An object of class
"rmhstart"
, which is essentially a list of parameters describing the initial point pattern and (optionally) the initial state of the random number generator. There is aprint
method for this class, which prints a sensible description of the initial state.
Warnings
If iseed
is specified, this will fix the initial state
of the random number generator in any subsequent call
to rmh
.
See Also
Examples
# 30 random points
a <- rmhstart(n.start=30)
# a particular point pattern
data(cells)
b <- rmhstart(x.start=cells)
# set the seed
d <- rmhstart(n.start=30, iseed=c(42, 4, 2))