Skip to contents

KnnDistances: distance to the k-th nearest neighbour (ties by index), as spatstat.geom::nndist(X, k = k). QuadratTest: Pearson \(X^2\) of \(n_x \times n_y\) equal tiles of a rectangle, with upper-tail and two-sided p-values, as spatstat.explore::quadrat.test. MorisitaIndex: Morisita's index, the critical indices and the standardised index, as vegan::dispindmorisita. CrossK: cross-type K and L with Ripley's isotropic correction, as Kcross. SegregationTest: \(T = \sum_i \sum_m (p_m(x_i) - \bar p_m)^2\) with leave-one-out Gaussian-kernel type probabilities and a random-relabelling Monte Carlo p-value, as segregation.test. Identical to the Python arm morie.fn.pppextra; indices are 1-based here.

Usage

KnnDistances(points, k = 1L)

QuadratTest(points, window, nx, ny)

MorisitaIndex(counts, crit = 0.05)

CrossK(points, marks, i, j, window, r)

SegregationTest(points, marks, sigma, nsim = 19L, seed = 1)

Arguments

points

Two-column coordinates.

k

Neighbour order.

window

Rectangle c(x0, x1, y0, y1).

nx, ny

Tiles along x and y.

counts

Quadrat counts.

crit

Significance level of the critical indices.

marks

Type labels.

i, j

Types.

r

Distances.

sigma

Gaussian kernel bandwidth.

nsim

Number of relabellings.

seed

Philox seed.

Value

List.

References

Thompson, H. R. (1956). Distribution of distance to nth neighbour in a population of randomly distributed individuals. Ecology 37, 391-394.

Morisita, M. (1959). Measuring of the dispersion of individuals and analysis of the distributional patterns. Memoirs of the Faculty of Science, Kyushu University, Series E 2, 215-235.

Lotwick, H. W. and Silverman, B. W. (1982). Methods for analysing spatial processes of several types of points. JRSS B 44, 406-413.

Diggle, P. J., Zheng, P. and Durr, P. (2005). Nonparametric estimation of spatial segregation in a multivariate point process. Applied Statistics 54, 645-658.

Examples

KnnDistances(rbind(c(0, 0), c(1, 0), c(3, 0)), k = 2)$distance
#> [1] 3 2 3
MorisitaIndex(c(0, 0, 0, 10))$imor
#> [1] 4