Learn R Programming

markstat (version 0.1.5)

fmcorrinhom: Mark correlation functions for inhomogeneous point patterns with function-valued marks.

Description

Mark correlation functions for inhomogeneous point patterns with function-valued marks.

Usage

fmcorrinhom(X,
ftype = c("variogram", "stoyan", "rcorr", "shimatani", "beisbart",
 "isham", "stoyancov", "schlather"),
r = NULL,
lambda = NULL,
method_lambda = c("kernel", "Voronoi"),
bw = NULL,
f = NULL,
method = c("density", "loess"),
correction = c("Ripley", "translate", "none"),
normalise = TRUE,
tol = 0.01,
...)

Value

a data.frame which gives the estimated mark correlation function and the distance vector \(r\) at which the mark correlation function is estimated. The outputs of the mark correlation functions for each time point are stored as an attribute, which can be extracted as attr(., "ests").

Arguments

X

An object of class ppp or lpp.

ftype

Type of the test function \(t_f\). Currently any selection of "variogram", "stoyan", "rcorr", "shimatani", "beisbart", "isham", "stoyancov", "schlather".

r

Optional. The values of the argument r at which the mark correlation function should be evaluated.

lambda

Estimated intensity at data points. If not given, it will be estimated internally. See details.

method_lambda

The method to be used for estimating intensity at data points, if lambda = NULL.

bw

Bandwidth method to be used for estimating intensity at data points if lambda = NULL and method_lambda = "kernel".

f

Optional. Test function \(t_f\) used in the definition of the mark correlation function. If ftype is given, \(t_f\) should be NULL.

method

Type of smoothing, either density or loess.

correction

Type of edge correction to be applied, either of "Ripley", "translate", "none". This is used only if X is of class ppp.

normalise

If normalise=FALSE, only the numerator of the expression for the mark correlation function will be computed.

tol

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.

Author

Mehdi Moradi m2.moradi@yahoo.com and Matthias Eckardt

Details

The object X should be an object of class ppp or lpp, with a function-valued mark. The mark should be a data.frame whose columns give the mark values per time point in an increasing order. The marks per each time point should be numeric.

See detailed information in the help pages of the functions mcorrinhom.ppp and mcorrinhom.lpp. As here, \(X\) has a function-valued mark, depending on the class of \(X\) being ppp or lpp, the function mcorrinhom.ppp or mcorrinhom.lpp will be applied to each time point of the function-valued mark, and at the end an overall mark correlation function will be given. See details in Eckardt et. al (2024).

References

Moradi, M., & Eckardt, M. (2025). Inhomogeneous mark correlation functions for general marked point processes. arXiv e-prints, arXiv-2505.

Eckardt, M., Mateu, J., & Moradi, M. (2024). Function‐Valued Marked Spatial Point Processes on Linear Networks: Application to Urban Cycling Profiles. Stat, 13(4), e70013.

See Also

fmcorr, mcorrinhom.ppp, mcorrinhom.lpp.

Examples

Run this code
 library(spatstat.random)
 library(spatstat.geom)
 library(spatstat.explore)
 X <- rpoispp(100)
 marks(X) <- data.frame(
 t1 = runif(npoints(X),1,10),
 t2 = runif(npoints(X),1,10),
 t3 = runif(npoints(X),1,10),
 t4 = runif(npoints(X),1,10),
 t5 = runif(npoints(X),1,10))
 fmcorrinhom(X, ftype = "stoyan", method = "density", method_lambda = "kernel", bw = bw.scott)

Run the code above in your browser using DataLab