kfun(p, upto, by, nsim=0, prec=0.01, alpha=0.01)
"spp"
object defining a spatial point pattern in a given sampling window (see spp
).nsim=0
, so that no confidence limits are computed.nsim>0
, precision of points' coordinates generated during simulations. By default prec=0.01
.nsim>0
, significant level of the confidence limits. By default $\alpha=0.01$."fads"
with essentially the following components:seq(by,upto,by)
).r
is a data frame with the following variables:nsim>0
a vector of the upper local confidence limits of a Poisson pattern at a significant level $\alpha$.nsim>0
a vector of the lower local confidence limits of a Poisson pattern at a significant level $\alpha$.nsim>0
a vector of local p-values of departure from a Poisson pattern.kfun
ignores the marks of multivariate and marked point patterns, which are analysed as univariate patterns.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�lissier (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$.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.
plot.fads
,
spp
,
kval
,
k12fun
,
kijfun
,
ki.fun
,
kmfun
.data(BPoirier)
BP <- BPoirier
# 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)
# 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)
# 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)
Run the code above in your browser using DataLab