Mark correlation functions for homogeneous point patterns on Euclidean spaces.
# S3 method for ppp
mcorr(X,
ftype = c("variogram", "stoyan", "rcorr", "shimatani", "beisbart",
"isham", "stoyancov", "schlather"),
r = NULL,
method = c("density","loess"),
normalise = TRUE,
f = NULL,
tol = 0.01,
...)a data.frame which gives the estimated mark correlation function and the distance vector \(r\) at which the mark correlation function is estimated. If the point patten \(X\) has multiple real-valued marks, the estimated mark correlation function will be given for each mark. Name of columns will be the name of marks.
An object of class ppp.
Type of the test function \(t_f\). Currently any selection of "variogram", "stoyan", "rcorr", "shimatani", "beisbart", "isham", "stoyancov", "schlather".
Optional. The values of the argument \(r\) at which the mark correlation function should be evaluated.
Type of smoothing, either density or loess. See details.
If normalise=FALSE, only the numerator of the expression for the mark correlation function will be computed.
Optional. Test function \(t_f\) used in the definition of the mark correlation function. If ftype is given, \(t_f\) should be NULL.
Tolerance used in the calculation of the conditional mean of the marks. This is used only if ftype is schlather.
Arguments passed to unnormdensity or loess.
Mehdi Moradi m2.moradi@yahoo.com and Matthias Eckardt
For a homogeneous point process \(X\) in \(R^2\), the \(t_f\)-correlation function \(\kappa_{t_f}(r)\) is given as
$$
\kappa_{t_f}(r)
=
\frac{
\mathbb{E} \left[
t_f \left(
m_x, m_y
\right) \mid x, y \in X
\right]
}{
c_{t_f}
},
\quad
d(x,y)=r,
$$
where \(m_x, m_y\) are the marks of \(x, y \in X\), \(c_{t_f}\) is a normalizing factor, and \(d(x,y)=r\) is the Euclidean distance. Therefore, each mark correlation function is defined by a specific test function \(t_f(m_x, m_y)\) and its associated normalising factor \(c_{t_f}\). Let \(\mu_m\) and \(\sigma^2_m\) be the mean and variance of marks, then, the list below gives different test functions \(t_f\) and their normalised factors \(c_{t_f}\), following distinct available ftype.
\(t_f(m_x, m_y) = \frac{1}{2}(m_x - m_y)^2\), \(c_{t_f} = \sigma^2_m\).
\(t_f(m_x, m_y) = m_x m_y\), \(c_{t_f} = \mu^2_m\).
\(t_f(m_x, m_y) = m_x\), \(c_{t_f} = \mu_m\).
\(t_f(m_x, m_y) = (m_x - \mu_m)(m_y - \mu_m)\), \(c_{t_f} = \sigma^2_m\).
\(t_f(m_x, m_y) = m_x + m_y\), \(c_{t_f} = 2 \mu_m\).
\(t_f(m_x, m_y) = m_x m_y - \mu^2_m\), \(c_{t_f} = \sigma^2_m\).
\(t_f(m_x, m_y) = m_x m_y - \mu^2_m\), \(c_{t_f} = 1\).
\(t_f(m_x, m_y) = (m_x - \mu_m(r))(m_y - \mu_m(r))\), \(c_{t_f} = \sigma^2_m\).
For ftype="schlather", \(\mu_m(r)\) denotes the mean of the marks of all pairs of points whose pairwise distance lies within a tolerance tol of \(r\).
We refer to Eckardt and Moradi (2024) for details of these mark correlation functions.
Regarding the smoothing functions, if method="density", the functions unnormdensity will be called, and if method="loess", the function loess will be called.
If your ftype is not one of the defaults, then you need to give your test function \(t_f(m_1, m_2)\) using the argument f. In this case, normalise should be set as FALSE, as only the unnormalised version will be calculated. Depending on the form of the test function \(t_f(m_1, m_2)\), one can manually compute the normalisation factor.
If the point patten \(X\) has multiple real-valued marks, the function estimates the mark correlation function for each mark individually. In such case, marks are given as a data.frame whose columns represents different marks. The functions checks which columns are numeric, and for those the mark correlation function will be computed.
Eckardt, M., & Moradi, M. (2024). Marked spatial point processes: current state and extensions to point processes on linear networks. Journal of Agricultural, Biological and Environmental Statistics, 29(2), 346-378.
Stoyan, D. and Stoyan, H. (1994) Fractals, random shapes and point fields: methods of geometrical statistics. John Wiley and Sons.
markcorr, mcorr.lpp.
library(spatstat.geom)
library(spatstat.random)
X <- rpoispp(100)
marks(X) <- runif(npoints(X),1,10)
mcorr.ppp(X, ftype = "stoyan", method = "density")
Run the code above in your browser using DataLab