Learn R Programming

stpp (version 2.0-8)

kmr: Spatial \(r\)-mark function

Description

Computes an estimator of the spatial \(r\)-mark function.

Usage

kmr(xyt,s.region,s.lambda,ds,ks="epanech",hs,correction="none",approach="simplified")

Value

ekmr

A vector containing the values of \(k_[m.](u)\) estimated.

ds

If ds is missing, a vector of distances u at which kmr(u) is computed from 0 to until quarter of the maximum distance between the points in the pattern.

kernel

A vector of names and bandwidth of the spatial kernel.

kmrtheo

Value under the Poisson case is calculated considering \(\tau\)=max(xyt[,3])-min(xyt[,3]).

Arguments

xyt

Spatial coordinates and times \((x,y,t)\) of the point pattern.

s.region

Two-column matrix specifying polygonal region containing all data locations.

s.lambda

Vector of values of the spatial intensity function evaluated at the points \((x,y)\) in \(W\). If s.lambda is missing, the estimate of the spatial mark correlation function is computed as for the homogeneous case, i.e. considering \(n/|W|\) as an estimate of the spatial intensity under the parameter approach="standardised".

ds

A vector of distances u at which kmr(u) is computed.

ks

A kernel function for the spatial distances. The default is the "epanech" kernel. It can also be "box" for the uniform kernel, or "biweight".

hs

A bandwidth of the kernel function ks.

correction

A character vector specifying the edge-correction(s) to be applied among "isotropic", "border", "modified.border", "translate", "setcovf" and "none". The default is "none".

approach

A character vector specifying the approach to use for the estimation to be applied among "simplified" or "standardised". If approach is missing, "simplified" is considered by default.

Author

Francisco J. Rodriguez Cortes <frrodriguezc@unal.edu.co> https://fjrodriguezcortes.wordpress.com

Details

By default, this command calculates an estimate of the spatial \(r\)-mark function \(k_[m.](r)\) for a spatio-temporal point pattern.

References

Baddeley, A., Rubak, E., Turner, R. (2015). Spatial Point Patterns: Methodology and Applications with R. CRC Press, Boca Raton.

Chiu, S. N., Stoyan, D., Kendall, W. S., and Mecke, J. (2013). Stochastic Geometry and its Applications. John Wiley & Sons.

Gabriel, E., Rowlingson, B., Diggle P J. (2013) stpp: an R package for plotting, simulating and analyzing Spatio-Temporal Point Patterns. Journal of Statistical Software 53, 1-29.

Illian, J B., Penttinen, A., Stoyan, H. and Stoyan, D. (2008). Statistical Analysis and Modelling of Spatial Point Patterns. John Wiley and Sons, London.

Stoyan, D., Rodriguez-Cortes, F. J., Mateu, J. and Wilfried, G. (2016). Mark variograms for spatio-temporal point processes, Submitted .

Examples

Run this code
    ## Not run:
    #################
    
    # A realisation of spatio-temporal homogeneous Poisson point processes
    hpp <- rpp(lambda = 100, replace = FALSE)$xyt
    
    # R plot
    plot(hpp)
    
    # This function provides an kernel estimator of the spatial r-mark function
    out <- kmr(hpp)
    
    # R plot - Spatial r-mark function
    par(mfrow=c(1,1))
    xl <- c(0,0.25)
    plot(out$ds,out$ekmr,type="l",xlab="r = distance",ylab=expression(k[m.](r)),
         xlim=xl,col=1,cex.lab=1.5,cex.axis=1.5)
    lines(out$ds,rep(out$kmrtheo,length(out$ds)),col=11)
    
    ## End(Not run)
  

Run the code above in your browser using DataLab