Learn R Programming

dbmss (version 2.1.2)

mhat: Estimation of the m function

Description

Estimates the m function

Usage

mhat(X, r = NULL, ReferenceType, NeighborType = ReferenceType,
    CaseControl = FALSE, adjust = 1, CheckArguments = TRUE)

Arguments

X
A weighted, marked planar point pattern (wmppp.object).
r
A vector of distances. If NULL, a default value is set: 512 equally spaced values are used up to the median distance between points (following Duranton and Overman, 2005).
ReferenceType
One of the point types.
NeighborType
One of the point types. By default, the same as reference type.
CaseControl
Logical; if TRUE, the case-control version of M is computed. ReferenceType points are cases, NeighborType points are controls.
adjust
Force the automatically selected bandwidth to be multiplied by adjust. Setting it to values lower than one (1/2 for example) will sharpen the estimation.
CheckArguments
Logical; if TRUE, the function arguments are verified. Should be set to FALSE to save time in simulations for example, when the arguments have been checked elsewhere.

Value

  • An object of class fv, see fv.object, which can be plotted directly using plot.fv.

Details

m is a weighted, density, relative measure of a point pattern structure. Its value at any distance is the ratio of neighbors of the NeighborType to all points around ReferenceType points, normalized by its value over the windows. The number of neighbors at each distance is estimated by a Gaussian kernel whose bandwith is chosen optimally according to Sheather and Jones (1991). It can be sharpened or smoothed by multiplying it by adjust.

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 B, 53(3): 683-690.

See Also

mEnvelope, Kdhat

Examples

Run this code
data(paracou16)
plot(paracou16)

# Calculate M
plot(mhat(paracou16, , "V. Americana", "Q. Rosea"))

Run the code above in your browser using DataLab