Learn R Programming

dbmss (version 1.2.4)

Kd.r: Estimation of the Kd function

Description

Estimates the Kd function

Usage

Kd.r(X, r, ReferenceType, NeighborType, Weighted = FALSE, Original=TRUE)

Arguments

X
A point pattern (ppp.object), marks must be a dataframe with two columns: PointType: labels, as factors. PointWeight: weights.
r
A vector of distances.
ReferenceType
One of the point types.
NeighborType
One of the point types.
Weighted
Logical; if TRUE, estimates the Kemp function.
Original
Logical; if TRUE (by default), the original bandwidth selection by Duranton and Overman (2005) following Silverman (2006: eq 3.31) is used. If FALSE, it is calculated following Sheather and Jones (1991), ie. the state of the art.

Value

  • A vector containing Kd(r) values.

Details

Kd is a density, relative measure of a point pattern structure. Kd is computed efficiently by building a matrix of distances between point pairs and calculating the density of their distribution. The kernel estimator is Gaussian. The weighted Kd function has been named Kemp (emp is for employees) by Duranton and Overman (2005).

References

Duranton, G. and Overman, H. G. (2005). Testing for Localisation Using Micro-Geographic Data. Review of Economic Studies 72(4): 1077-1106. Sheather, S. J. and Jones, M. C. (1991) A reliable data-based bandwidth selection method for kernel density estimation. Journal of the Royal Statistical Society series B, 53, 683-690.

See Also

KdEnvelope, GlobalEnvelope, M.r

Examples

Run this code
data(paracou16)
plot(paracou16)

# Calculate Kd
r <- 0:100
ActualValues.X <- Kd.r(paracou16, r, "Q. Rosea", "Q. Rosea")

# Plot
PlotResults(r, ActualValues.X, ylab="Kd", Legend=TRUE, LegendItems="Kd", 
    LegendPosition="bottomright")

Run the code above in your browser using DataLab