Skip to contents

Compute aggregation of Ripley's K based on Diggle et al. (1991)

Usage

diggle.avg(K.vec, n.vec)

Arguments

K.vec

Vector of Ripley's K estimates across a series of images

n.vec

Vector of the number of points in each image

Value

Returns a weighted average of the Ripley's K values based on the number of points in each image

References

Diggle et al. (1991). Analysis of Variance for Replicated Spatial Point Patterns in Clinical Neuroanatomy. Journal of the American Statistical Association, 86(415), 618-625.

Examples

# Generate simulated Ripley's K values, areas, and number of points
K.vec <- rnorm(3, mean = 1000, sd = 100)
n.vec <- rnorm(3, mean = 300, sd = 50)

# Compute a weighted average
diggle.avg(K.vec, n.vec)
#> [1] 929.7964