kernel2d               package:splancs               R Documentation

_K_e_r_n_e_l _s_m_o_o_t_h_i_n_g _o_f _a _p_o_i_n_t _p_a_t_t_e_r_n

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

     Perform kernel smoothing of a point pattern

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

     kernel2d(pts,poly,h0,nx=20,ny=20,kernel='quartic')

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

     pts: A points data set 

    poly: A polygon data set 

      h0: The kernel width parameter 

      nx: Number of points along the x-axis of the returned grid. 

      ny: Number of points along the y-axis of the returned grid. 

  kernel: Type of kernel function to use. Currently only the quartic
          kernel is implemented. 

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

     The kernel estimate, with a correction for edge effects, is
     computed for a grid of points that span the input polygon. The
     kernel function for points in the grid that are outside the
     polygon are returned as NA's. The output list is in a format that
     can be read into 'image()' directly, for display and superposition
     onto other plots.

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

     A list with the following components: 

       x: List of x-coordinates at which the kernel function has been
          evaluated.

       y: List of y-coordinates at which the kernel function has been
          evaluated.

       z: A matrix of dimension 'nx' by 'ny' containing the value of
          the kernel function.

h0, kernel: containing the values input to 'kernel2d'

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

     Berman M. and Diggle P.J. (1989) Estimating Weighted Integrals of
     the Second-Order Intensity of Spatial Point Patterns.  _J. R.
     Statist Soc_ B51 81-92; Rowlingson, B. and Diggle, P. 1993
     Splancs: spatial point pattern analysis code in S-Plus.  Computers
     and Geosciences, 19, 627-655, (Barry Rowlingson ); the original
     sources can be accessed at: <URL:
     http://www.maths.lancs.ac.uk/~rowlings/Splancs/>. See also Bivand,
     R. and Gebhardt, A. 2000 Implementing functions for spatial
     statistical analysis using the R language. Journal of Geographical
     Systems, 2, 307-317.

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

     data(bodmin)
     plot(bodmin$poly, asp=1, type="n")
     image(kernel2d(as.points(bodmin), bodmin$poly, h0=2, nx=100, ny=100), 
     add=TRUE, col=terrain.colors(20))
     pointmap(as.points(bodmin), add=TRUE)
     polymap(bodmin$poly, add=TRUE)

