Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

edge.Ripley

Ripley's Isotropic Edge Correction


Description

Computes Ripley's isotropic edge correction weights for a point pattern.

Usage

edge.Ripley(X, r, W = Window(X), method = c("C", "interpreted"),
            maxweight = 100, internal=list())

rmax.Ripley(W)

Arguments

X

Point pattern (object of class "ppp").

W

Window for which the edge correction is required.

r

Vector or matrix of interpoint distances for which the edge correction should be computed.

method

Choice of algorithm. Either "interpreted" or "C". This is needed only for debugging purposes.

maxweight

Maximum permitted value of the edge correction weight.

internal

For developer use only.

Details

The function edge.Ripley computes Ripley's (1977) isotropic edge correction weight, which is used in estimating the K function and in many other contexts.

The function rmax.Ripley computes the maximum value of distance r for which the isotropic edge correction estimate of K(r) is valid.

For a single point x in a window W, and a distance r > 0, the isotropic edge correction weight is

e(u, r) = 2 * π * r/length(intersection(c(u,r), W))

where c(u,r) is the circle of radius r centred at the point u. The denominator is the length of the overlap between this circle and the window W.

The function edge.Ripley computes this edge correction weight for each point in the point pattern X and for each corresponding distance value in the vector or matrix r.

If r is a vector, with one entry for each point in X, then the result is a vector containing the edge correction weights e(X[i], r[i]) for each i.

If r is a matrix, with one row for each point in X, then the result is a matrix whose i,j entry gives the edge correction weight e(X[i], r[i,j]). For example edge.Ripley(X, pairdist(X)) computes all the edge corrections required for the K-function.

If any value of the edge correction weight exceeds maxwt, it is set to maxwt.

The function rmax.Ripley computes the smallest distance r such that it is possible to draw a circle of radius r, centred at a point of W, such that the circle does not intersect the interior of W.

Value

A numeric vector or matrix.

Author(s)

and Rolf Turner r.turner@auckland.ac.nz

References

Ripley, B.D. (1977) Modelling spatial patterns (with discussion). Journal of the Royal Statistical Society, Series B, 39, 172 – 212.

See Also

Examples

v <- edge.Ripley(cells, pairdist(cells))

  rmax.Ripley(Window(cells))

spatstat.core

Core Functionality of the 'spatstat' Family

v2.1-2
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Kasper Klitgaard Berthelsen [ctb], Achmad Choiruddin [ctb], Jean-Francois Coeurjolly [ctb], Ottmar Cronie [ctb], Tilman Davies [ctb], Julian Gilbey [ctb], Yongtao Guan [ctb], Ute Hahn [ctb], Kassel Hingee [ctb], Abdollah Jalilian [ctb], Marie-Colette van Lieshout [ctb], Greg McSwiggan [ctb], Tuomas Rajala [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Plenge Waagepetersen [ctb], Hangsheng Wang [ctb]
Initial release
2021-04-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.