rmhstart              package:spatstat              R Documentation

_D_e_t_e_r_m_i_n_e _I_n_i_t_i_a_l _S_t_a_t_e _f_o_r _M_e_t_r_o_p_o_l_i_s-_H_a_s_t_i_n_g_s _S_i_m_u_l_a_t_i_o_n.

_D_e_s_c_r_i_p_t_i_o_n:

     Builds a description of the initial state for the
     Metropolis-Hastings algorithm.

_U_s_a_g_e:

        rmhstart(start)
        rmhstart(..., n.start=NULL, x.start=NULL, iseed)

_A_r_g_u_m_e_n_t_s:

   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. 

_D_e_t_a_i_l_s:

     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:

     _n._s_t_a_r_t The number of ``initial'' points to be randomly
          (uniformly) generated in the simulation window 'w'.
          Incompatible with 'x.start'.

          For a multitype point process, 'n.start' may be a vector (of
          length equal to the number of types) giving the number of
          points of each type to be generated.  

          If expansion of the simulation window is selected (see the
          argument 'expand' to 'rmhcontrol'), then 'n.start' will be
          multiplied by the expansion factor (ratio of the areas of the
          expanded window and original window).

          For faster convergence of the Metropolis-Hastings algorithm,
          the value of 'n.start' should be roughly equal to (an
          educated guess at) the expected number of points which will
          be generated inside the window.

     _x._s_t_a_r_t Initial point pattern configuration. Incompatible with
          'n.start'.

          'x.start' may be a point pattern (an object of class 'ppp'),
          or an object which can be coerced to this class by 'as.ppp',
          or a dataset containing vectors 'x' and 'y'.  

          If 'x.start' is specified, then expansion of the simulation
          window (the argument 'expand' of 'rmhcontrol') is not
          permitted.

     _i_s_e_e_d Seed for the random number generator. A vector of three
          integers.

          If given, this seed will fix the initial state of the random
          number generator in any subsequent call to 'rmh'.

          This should only be done  if it is desired to repeat the
          algorithm with exactly the same sequence of random numbers!

     The parameters 'n.start' and 'x.start' are _incompatible_.

_V_a_l_u_e:

     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 a 'print' method for this class, which prints a sensible
     description of the initial state.

_W_a_r_n_i_n_g_s:

     If 'iseed' is specified, this will fix the initial state of the
     random number generator in any subsequent call to 'rmh'.

_A_u_t_h_o_r(_s):

     Adrian Baddeley adrian@maths.uwa.edu.au <URL:
     http://www.maths.uwa.edu.au/~adrian/> and Rolf Turner
     rolf@math.unb.ca <URL: http://www.math.unb.ca/~rolf>

_S_e_e _A_l_s_o:

     'rmh', 'rmhcontrol', 'rmhmodel'

_E_x_a_m_p_l_e_s:

        # 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))

