Learn R Programming

dbmss (version 1.2.4)

DivideByPiR2: Divides a value by $\pi R^2$

Description

This function is designed to simplify plotting K and similar functions dividing their values by $\pi R^2$.

Usage

DivideByPiR2(Value, r)

Arguments

Value
A vector of values.
r
The vector of distances

Value

  • A vector of values.

Details

The classical normalization (Besag, 1977) of K(r) is $L(r)=\sqrt{\frac{K}{\pi}}$. The normalization by $\pi R^2$ is advocated by Marcon and Puech (2012) to allow the unification of distance-based measures of spatial structures.

References

Besag, J. E. (1977). Comments on Ripley's paper. Journal of the Royal Statistical Society B 39(2): 193-195. Marcon, E. and F. Puech (2012). A typology of distance-based measures of spatial concentration. HAL SHS. 00679993.

See Also

K.r, L.r, Kmm.r, , D.r

Examples

Run this code
data(paracou16)
# Keep only 20% of points to run this example
X <- rthin(paracou16, 0.2)
plot(X)

# Calculate K
r <- 0:30
ActualValues.X <- K.r(X, r)

# Calculate confidence envelope (should be 1000 simulations, reduced to 4 to save time)
NumberOfSimulations <- 4
Alpha <- .10
LocalEnvelope.X <- KEnvelope(NumberOfSimulations, Alpha, X, r)

# Plot
PlotResults(r, DivideByPiR2(ActualValues.X, r), lapply(LocalEnvelope.X, DivideByPiR2, r), 
    ylab="K / (pi R^2)", ReferenceValue=1)

Run the code above in your browser using DataLab