kfun {ads} | R Documentation |
Multiscale second-order neighbourhood analysis of an univariate spatial point pattern
Description
Computes estimates of Ripley's K-function and associated neighbourhood functions from an univariate spatial point pattern in a simple (rectangular or circular) or complex sampling window. Computes optionally local confidence limits of the functions under the null hypothesis of Complete Spatial Randomness (see Details).
Usage
kfun(p, upto, by, nsim=0, prec=0.01, alpha=0.01)
Arguments
p |
a |
upto |
maximum radius of the sample circles (see Details). |
by |
interval length between successive sample circles radii (see Details). |
nsim |
number of Monte Carlo simulations to estimate local confidence limits of the null hypothesis of complete spatial randomness (CSR) (see Details).
By default |
prec |
if |
alpha |
if |
Details
Function kfun
computes Ripley's K(r)
function of second-order neighbourhood analysis and the associated functions g(r)
, n(r)
and L(r)
.
For a homogeneous isotropic point process of intensity \lambda
, Ripley (1977) showed that
the second-order property could be characterized by a function K(r)
, so that the expected
number of neighbours within a distance r
of an arbitrary point of the pattern is:
N(r) = \lambda*K(r)
.
K(r)
is a intensity standardization of N(r)
, which has an expectation of \pi*r^2
under the null hypothesis of CSR: K(r) = N(r)/\lambda
.
n(r)
is an area standardization of N(r)
, which has an expectation of \lambda
under the null hypothesis of CSR: n(r) = N(r)/(\pi*r^2)
, where \pi*r^2
is the area of the disc of radius r
.
L(r)
is a linearized version of K(r)
(Besag 1977), which has an expectation of 0 under the null hypothesis of CSR: L(r) = \sqrt(K(r)/\pi)-r
. L(r) becomes positive when the pattern tends to clustering and negative when it tends to regularity.
g(r)
is the derivative of K(r)
or pair density function (Stoyan et al. 1987), so that the expected
number of neighbours at a distance r
of an arbitrary point of the pattern (i.e. within an annuli between two successive circles with radii r
and r-by
) is:
O(r) = \lambda*g(r)
.
The program introduces an edge effect correction term according to the method proposed by Ripley (1977)
and extended to circular and complex sampling windows by Goreaud & P?Pelissier (1999).
Theoretical values under the null hypothesis of CSR as well as
local Monte Carlo confidence limits and p-values of departure from CSR (Besag & Diggle 1977) are estimated at each distance r
.
Value
A list of class "fads"
with essentially the following components:
r |
a vector of regularly spaced out distances ( |
g |
a data frame containing values of the pair density function |
n |
a data frame containing values of the local neighbour density function |
k |
a data frame containing values of Ripley's function |
l |
a data frame containing values of the modified Ripley's function |
Each component except r
is a data frame with the following variables:
obs |
a vector of estimated values for the observed point pattern. |
theo |
a vector of theoretical values expected for a Poisson pattern. |
sup |
(optional) if |
inf |
(optional) if |
pval |
(optional) if |
Warning
Function kfun
ignores the marks of multivariate and marked point patterns, which are analysed as univariate patterns.
Note
There are printing and plotting methods for "fads"
objects.
Author(s)
References
Besag J.E. 1977. Discussion on Dr Ripley's paper. Journal of the Royal Statistical Society B, 39:193-195.
Besag J.E. & Diggle P.J. 1977. Simple Monte Carlo tests spatial patterns. Applied Statistics, 26:327-333.
Goreaud F. & P?Pelissier R. 1999. On explicit formulas of edge effect correction for Ripley's K-function. Journal of Vegetation Science, 10:433-438.
Ripley B.D. 1977. Modelling spatial patterns. Journal of the Royal Statistical Society B, 39:172-192.
Stoyan D., Kendall W.S. & Mecke J. 1987. Stochastic geometry and its applications. Wiley, New-York.
See Also
plot.fads
,
spp
,
kval
,
k12fun
,
kijfun
,
ki.fun
,
kmfun
.
Examples
data(BPoirier)
BP <- BPoirier
## Not run: spatial point pattern in a rectangle sampling window of size [0,110] x [0,90]
swr <- spp(BP$trees, win=BP$rect)
kswr <- kfun(swr,25,1,500)
plot(kswr)
## Not run: spatial point pattern in a circle with radius 50 centred on (55,45)
swc <- spp(BP$trees, win=c(55,45,45))
kswc <- kfun(swc, 25, 1, 500)
plot(kswc)
## Not run: spatial point pattern in a complex sampling window
swrt <- spp(BP$trees, win=BP$rect, tri=BP$tri1)
kswrt <- kfun(swrt, 25, 1, 500)
plot(kswrt)