Kmm              package:ecespa              R Documentation(latin1)

_M_a_r_k-_w_e_i_g_h_t_e_d _K-_f_u_n_c_t_i_o_n

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

     This is a functional data summary for marked point patterns that
     measures the joint pattern of points and marks at different scales
     determined by r.

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

     Kmm(mippp, r = 1:10, nsim=NULL)

     ## S3 method for ploting objects of class 'ecespa.kmm':
     ## S3 method for class 'ecespa.kmm':
     plot(x, type="Kmm.n", q=0.025, 
                 xlime=NULL, ylime=NULL,  maine=NULL, add=FALSE, kmean=TRUE,
                 ylabe=NULL, xlabe=NULL, lty=c(1,2,3), col=c(1,2,3), lwd=c(1,1,1),
                  ...)

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

   mippp: A marked point pattern. An object with the 'ppp' format of
          'spatstat'. 

       r: Sequence of distances at which 'Kmm' is estimated. 

    nsim: Number of simulated point patterns to be generated when
          computing the envelopes.

       x: An object of class 'ecespa.kmm'. The result of applying 'Kmm'
          to a marked point pattern.

    type: Type of mark-weighted K-function to plot. One of '"Kmm"'
          ("plain" mark-weighted K-function) or  '"Kmm.n"' (normalized
          mark-weighted K-function). 

       q: Quantile for selecting the simulation envelopes.

   xlime: Max and min coordinates for the x-axis.

   ylime: Max and min coordinates for the y-axis.

   maine: Title to add to the plot.

     add: Logical. Should the kmm.object be added to a previous plot? 

   kmean: Logical. Should the mean of the simulated Kmm envelopes be
          ploted?

   ylabe: Text  or expression to label the y-axis. 

   xlabe: Text  or expression to label the x-axis.

     lty: Vector with the line type for the estimated Kmm function, the
          simulated envelopes and the mean of the simulated envelopes. 

     col: Vector with the color for the estimated Kmm function, the
          simulated envelopes and the mean of the simulated envelopes.

     lwd: Vector with the line width for the estimated Kmm function,
          the simulated envelopes and the mean of the simulated
          envelopes.

     ...: Additional graphical parameters passed to plot.

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

     Penttinnen (2006) defines Kmm(r), the mark-weighted K-function  of
     a stationary marked point process X,  so that 

                 lambda*Kmm(r) = Eo[sum(mo*mn)]/mu^2

     where lambda is the intensity of the process,  i.e. the expected
     number of points of X per unit area, Eo[ ]  denotes expectation
     (given that there is a point at the origin);  m0 and mn are the
     marks attached to every two points of the process separated by a
     distance <= r  and mu is the mean mark. It measures the joint
     pattern of marks and points at the scales determmined by r. If all
     the marks are set to 1, then lambda*Kmm(r) equals the expected
     number of additional random points within  a distance r of a
     typical random point of X, i.e. Kmm becomes the conventional
     Ripley's K-function for unmarked point processes. As the
     K-function measures clustering or regularity among the points
     regardless of the marks, one can separate clustering of marks with
     the _normalized weighted K-function_ 

                   Kmm.normalized(r) = Kmm(r)/K(r)

     If the process is independently marked, Kmm(r) equals K(r) so the 
     normalized mark-weighted K-function will equal 1 for all distances
     r.

     If 'nsim != NULL', 'Kmm'  computes  _'simulation envelopes'_ from
     the simulated point patterns. These are simulated from 'nsim'
     random permutations of the marks over the points coordinates. This
     is a kind of pointwise test of Kmm(r) == 1  or normalized Kmm(r)
     == 1 for a given r.

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

     'Kmm' returns an object of class ''ecespa.kmm'', basically a list
     with the following items:

dataname : Name of the analyzed point pattern.

      r : Sequence of distances at which 'Kmm' is estimated. 

    nsim: Number of simulations for computing the envelopes, or 'NULL'
          if none.

    kmm : Mark-weighted K-function.

  kmm.n : Normalized mark-weighted K-function.

 kmmsim : Matrix of simulated  mark-weighted K-functions, or or 'NULL'
          if none.

kmmsim.n : Matrix of simulated  normalized mark-weighted K-functions,
          or or 'NULL' if none.

_N_o_t_e:

     This implementation estimates Kmm(r) without any correction of
     border effects, so it must be used with caution. However, as K(r)
     is  also estimed without correction it migth compensate the border
     effects on the normalized Kmm-function.

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

     Marcelino de la Cruz Rot marcelino.delacruz@upm.es

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

     De la Cruz, M. 2008. Metodos para analizar datos puntuales.  En:
     _Introduccion al Analisis Espacial de Datos en Ecologia y Ciencias
     Ambientales: Metodos y Aplicaciones _  (eds. Maestre, F. T.,
     Escudero, A. y Bonet, A.), pp 76-127. Asociacion Espanola de
     Ecologia Terrestre, Universidad Rey Juan Carlos y Caja de Ahorros
     del Mediterraneo, Madrid.

     Penttinen, A. 2006. Statistics for Marked Point Patterns. In _The
     Yearbook of the Finnish Statistical Society_, pp. 70-91.

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

     'markcorr'

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

       ## Not run: 
       ## Figure 3.10 of De la Cruz (2008):
       
       data(seedlings1)
       
       data(seedlings2)
       
       s1km <- Kmm(seedlings1, r=1:100)
       
       s2km <- Kmm(seedlings2, r=1:100)
       
       plot(s1km, ylime=c(0.6,1.2), lwd=2, maine="", xlabe="r(cm)")

       plot(s2km,  lwd=2, lty=2, add=T )

       abline(h=1, lwd=2, lty=3)
       
       legend(x=60, y=1.2, legend=c("Hs_C1", "Hs_C2", "H0"),
              lty=c(1, 2, 3), lwd=c(3, 2, 2), bty="n")
      
     ## A pointwise test of normalized Kmm == 1 for seedlings1:

        s1km.test <- Kmm(seedlings1, r=1:100, nsim=99)

        plot(s1km.test,  xlabe="r(cm)")

       ## End(Not run)

