Learn R Programming

markstat (version 0.1.5)

fmcorr: Mark correlation functions for homogeneous point patterns with function-valued marks.

Description

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

Usage

fmcorr(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 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.

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

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 mcorr.ppp and mcorr.lpp. As here, \(X\) has a function-valued mark, depending on the class of \(X\) being ppp or lpp, the function mcorr.ppp or mcorr.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

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

mcorr.ppp, mcorr.lpp, fmcorrinhom.

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))
 fmcorr(X,  ftype = "stoyan", method = "density")

Run the code above in your browser using DataLab