[R] O-ring statistic
adrian at maths.uwa.edu.au
Fri Dec 9 03:39:44 CET 2005
Rainer M Krug writes:
> Thorsten Wiegand used in his paper Wiegand T., and K. A. Moloney 2004.
> Rings, circles and null-models for point pattern analysis in ecology.
> Oikos 104: 209-229 a statistic he called O-Ring statistic which is
> similar to Ripley's K, only that it uses rings instead of circles.
> Is this statistic included in one of the packages in R?
This kind of functionality is available in the R package `spatstat'
(available on CRAN or from www.spatstat.org)
According to the cited website, the O-ring statistic is a rescaled
version of the pair correlation function between two types of points:
O_12(r) = lambda_2 g_12(r)
In spatstat, pair correlation functions are computed by the function
'pcf'. To estimate the cross-type pair correlation function,
you do something like
pcf(Kcross(X, 1, 2))
where X is a marked point pattern containing points of types 1 and 2.
To estimate the intensity of type 2 points you use summary(X).
Here's an example for the bivariate point pattern dataset 'amacrine'
provided in the spatstat package. The dataset has points of two types
labelled "on" and "off".
K12 <- Kcross(amacrine, "on", "off")
g12 <- pcf(K12, method="d", spar=0.7)
lambda2 <- summary(amacrine)$marks["off","intensity"]
Oring <- eval.fv(lambda2 * g12)
More information about the R-help