Learn R Programming

markstat (version 0.1.5)

lfmcorr: Local mark correlation functions for homogeneous point patterns with function-valued marks.

Description

Local mark correlation functions for homogeneous point patterns with function-valued marks.

Usage

lfmcorr(X,
ftype = c("variogram", "stoyan", "rcorr", "shimatani", "beisbart",
 "isham", "stoyancov", "schlather"),
r = NULL,
method = c("density","loess"),
normalise = TRUE,
f = NULL,
tol = 0.01,
...)

Value

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

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.

method

Type of smoothing, either density or loess. See details.

normalise

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

f

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

tol

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.

Author

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

Details

This function computes local mark correlation functions for a homogeneous point pattern with a function-valued mark. See the details of test functions used in fmcorr. Technical details are given in Eckardt and Moradi (2025).

References

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.

Eckardt, M., & Moradi, M. (2025). Local indicators of mark association for marked spatial point processes.

See Also

mcorr.ppp, mcorr.lpp, fmcorr.

Examples

Run this code
 library(spatstat.random)
 library(spatstat.geom)
 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))
 lfmcorr(X,  ftype = "stoyan", method = "density")

Run the code above in your browser using DataLab