Pairwise              package:spatstat              R Documentation

_G_e_n_e_r_i_c _P_a_i_r_w_i_s_e _I_n_t_e_r_a_c_t_i_o_n _m_o_d_e_l

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

     Creates an instance of a pairwise interaction point process model
     which can then be fitted to point pattern data.

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

       Pairwise(pot, name)
       Pairwise(pot, name, par, parnames)

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

     pot: An S language function giving the user-supplied pairwise
          interaction potential.

    name: Character string.

     par: List of numerical values for irregular parameters

parnames: Vector of names of irregular parameters

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

     Advanced use only.

     This code constructs a member of the pairwise interaction family
     'pairwise.family' with arbitrary pairwise interaction potential
     given by the user.

     The function 'pot' must take as its first argument a matrix of
     interpoint distances, and evaluate the potential for each of these
     distances. The result must be either a matrix with the same
     dimensions as its input, or an array with its first two dimensions
     the same as its input (the latter case corresponds to a
     vector-valued potential).

     If irregular parameters are present, then the second argument to
     'pot' should be a vector of the same type as 'par' giving those
     parameter values.

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

     An object of class '"interact"' describing the interpoint
     interaction structure of a point process.

_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:

     'ppm', 'pairwise.family', 'ppm.object'

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

        #This is the same as StraussHard(r=0.7,h=0.2)
        strpot <- function(t,par) {
              r <- par$r
              h <- par$h
              value <- (t <= r)
              value[t < h] <- -Inf
              value
        }
        mySH <- Pairwise(strpot, "StraussHard", list(r=0.7,h=0.2),
                c("interaction distance r", "hard core distance c"))
        data(cells)
        ppm(cells, ~ 1, mySH)

