quadscheme             package:spatstat             R Documentation

_G_e_n_e_r_a_t_e _a _Q_u_a_d_r_a_t_u_r_e _S_c_h_e_m_e _f_r_o_m _a _P_o_i_n_t _P_a_t_t_e_r_n

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

     Generates a quadrature scheme (an object of class '"quad"') from
     point patterns of data and dummy points.

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

      quadscheme(data, dummy, method="grid", ...)

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

    data: The observed data point pattern. An object of class '"ppp"'
          or in a format recognised by 'as.ppp()' 

   dummy: The pattern of dummy points for the quadrature.  An object of
          class '"ppp"' or in a format recognised by 'as.ppp()'
          Defaults to 'default.dummy(data, ...)' 

  method: The name of the method for calculating quadrature weights:
          either '"grid"' or '"dirichlet"'. 

     ...: Parameters of the weighting method (see below) and parameters
          for constructing the dummy points if necessary. 

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

     This is the primary method for producing a quadrature schemes for
     use by 'ppm'.

     The function 'ppm' fits a point process model to an observed point
     pattern using  the Berman-Turner quadrature approximation (Berman
     and Turner, 1992; Baddeley and Turner, 2000) to the
     pseudolikelihood of the model.  It requires a quadrature scheme
     consisting of  the original data point pattern, an additional
     pattern of dummy points, and a vector of quadrature weights for
     all these points. Such quadrature schemes are represented by
     objects of class '"quad"'. See 'quad.object' for a description of
     this class.

     Quadrature schemes are created by the function 'quadscheme'. The
     arguments 'data' and 'dummy' specify the data and dummy points,
     respectively. There is a sensible default for the dummy  points
     (provided by 'default.dummy'). Alternatively the dummy points may
     be specified arbitrarily and given in any format recognised by
     'as.ppp'. There are also functions for creating dummy patterns
     including 'corners', 'gridcentres', 'stratrand' and 'spokes'.

     The quadrature region is the region over which we are integrating,
     and approximating integrals by finite sums. If 'dummy' is a point
     pattern object (class '"ppp"') then the quadrature region is taken
     to be 'dummy$window'. If 'dummy' is just a list of x, y
     coordinates then the quadrature region defaults to the observation
     window of the data pattern, 'data$window'.

     If 'dummy' is missing, then the optional arguments (for '...')
     include an argument 'nd'. An 'nd[1]' by 'nd[2]' grid of dummy
     points is generated by 'default.dummy'.

     If 'method = "grid"' then the optional arguments (for '...') are 
     '(nd, ntile)'. The quadrature region (see below) is divided into
     an 'ntile[1]' by 'ntile[2]' grid of rectangular tiles. The weight
     for each quadrature point is the area of a tile divided by the
     number of quadrature points in that tile. 

     If 'method="dirichlet"' then the optional arguments are
     '(exact=TRUE, nd)'. The quadrature points (both data and dummy)
     are used to construct the Dirichlet tessellation. The quadrature
     weight of each point is the area of its Dirichlet tile inside the
     quadrature region. If 'exact == TRUE' then this area is computed
     exactly using the package 'deldir'; otherwise it is computed
     approximately by discretisation.

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

     An object of class '"quad"' describing the quadrature scheme (data
     points, dummy points, and quadrature weights) suitable as the
     argument 'Q' of the function 'ppm()' for fitting a point process
     model.

     The quadrature scheme can be inspected using the 'print' and
     'plot' methods for objects of class '"quad"'.

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

_R_e_f_e_r_e_n_c_e_s:

     Baddeley, A. and Turner, R. Practical maximum pseudolikelihood for
     spatial point patterns. _Australian and New Zealand Journal of
     Statistics_ *42* (2000) 283-322.

     Berman, M. and Turner, T.R.  Approximating point process
     likelihoods with GLIM. _Applied Statistics_ *41* (1992) 31-38.

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

     'ppm', 'as.ppp', 'quad.object', 'gridweights',
     'dirichlet.weights', 'corners', 'gridcentres', 'stratrand',
     'spokes'

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

       data(simdat)

       # grid weights
       Q <- quadscheme(simdat)
       Q <- quadscheme(simdat, method="grid")
       Q <- quadscheme(simdat, nd=50)           # 1 dummy point per tile
       Q <- quadscheme(simdat, ntile=25, nd=50) # 4 dummy points per tile

       # Dirichlet weights
       Q <- quadscheme(simdat, method="dirichlet", exact=FALSE)

       # random dummy pattern
       ## Not run: 
       D <- runifpoint(250, simdat$window)
       Q <- quadscheme(simdat, D, method="dirichlet", exact=FALSE)
       
     ## End(Not run)

       # polygonal window
       data(demopat)
       X <- unmark(demopat)
       Q <- quadscheme(X)

       # mask window
       X$window <- as.mask(X$window)
       Q <- quadscheme(X)
       

