k12hat: Bivariate K-function

View source: R/k12hat.S

k12hatR Documentation

Bivariate K-function

Description

Calculates an estimate of the bivariate K-function

Usage

k12hat(pts1,pts2,poly,s)

Arguments

pts1,pts2

Two points data sets

poly

A polygon containing the points

s

A vector of distances at which to estimate the K12 function

Details

The bivariate K function is defined as the expected number of points of pattern 1 within a distance s of an arbitrary point of pattern 2, divided by the overall density of the points in pattern 1. To estimate this function, the approximately unbiased estimator given by Lotwick and Silverman (1982) is used.

Value

A vector like s containing the value of K12hat at the points in s.

References

Lotwick, H.W. and Silverman B.W. (1982) Methods for Analysing Spatial Processes of Several types of Points. J. R. Statist Soc B44 406-13; Rowlingson, B. and Diggle, P. 1993 Splancs: spatial point pattern analysis code in S-Plus. Computers and Geosciences, 19, 627-655; the original sources can be accessed at: https://www.maths.lancs.ac.uk/~rowlings/Splancs/. See also Bivand, R. and Gebhardt, A. 2000 Implementing functions for spatial statistical analysis using the R language. Journal of Geographical Systems, 2, 307-317.

Examples

data(okwhite)
data(okblack)
okpoly <- list(x=c(okwhite$x, okblack$x), y=c(okwhite$y, okblack$y))
plot(seq(5,80,5), sqrt(k12hat(as.points(okwhite), as.points(okblack), 
bboxx(bbox(as.points(okpoly))), seq(5,80,5))/pi) - seq(5,80,5), xlab="distance", 
ylab=expression(hat(L)[12]), ylim=c(-20,20), type="l")

splancs documentation built on Aug. 21, 2023, 9:08 a.m.

Related to k12hat in splancs...