Mark correlation functions for inhomogeneous point patterns on linear networks.
# S3 method for lpp
mcorrinhom(X,
ftype = c("variogram", "stoyan", "rcorr", "shimatani",
"beisbart", "isham", "stoyancov", "schlather"),
r = NULL,
lambda = NULL,
method_lambda = c("kernel", "Voronoi"),
bw = bw.scott.iso,
f = NULL,
method = c("density", "loess"),
normalise = TRUE,
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 lpp.
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.
Estimated intensity at data points. If not given, it will be estimated internally. See details.
The method to be used for estimating intensity at data points, if lambda = NULL.
Bandwidth method to be used for estimating intensity at data points if lambda = NULL and method_lambda = "kernel".
Optional. Test function \(t_f\) used in the definition of the mark correlation function. If ftype is given, \(t_f\) should be NULL.
Type of smoothing, either density or loess.
If normalise=FALSE, only the numerator of the expression for the mark correlation function will be computed.
Tolerance used in the calculation of the conditional mean of marks. This is used only if ftype is schlather.
Arguments passed to unnormdensity or loess.
Mehdi Moradi m2.moradi@yahoo.com and Matthias Eckardt
Most of the details are given in mcorrinhom.ppp. However, here distances are measured via the shortest-path distances, and intensities are estimated differently. If method_lambda = "kernel", then the function calls
densityQuick.lpp in combination with the bandwidth chosen via bw.scott.iso. If method_lambda = "Voronoi", the functions calls
densityVoronoi.lpp with arguments f=0.2, nrep = 400 which are recommended by Moradi et al. (2019).
In the case of point processes on linear networks, adding correction will slow down the calculations. Given that, it is argued that the type of correction does not have significant effect on the final output, we have here ignored correction terms. We refer to Eckardt and Moradi (2024) and Moradi and Eckardt (2025) for further details.
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.
Moradi, M., Cronie, O., Rubak, E., Lachieze-Rey, R., Mateu, J., & Baddeley, A. (2019). Resample-smoothing of Voronoi intensity estimators. Statistics and computing, 29(5), 995-1010.
Moradi, M., & Eckardt, M. (2025). Inhomogeneous mark correlation functions for general marked point processes. arXiv e-prints, arXiv-2505.
mcorr.lpp, mcorrinhom.ppp.
library(spatstat.linnet)
library(spatstat.geom)
library(spatstat.explore)
X <- rpoislpp(10, simplenet)
marks(X) <- runif(npoints(X), 1, 10)
mcorrinhom.lpp(X, ftype = "stoyan", method = "density",
method_lambda = "kernel", bw = bw.scott.iso)
Run the code above in your browser using DataLab