ripVar | R Documentation |
Calculates the variance of the K-function of a Poisson point pattern, according to Ripley's formula (as taken from equation (3) in Hahn 2012).
ripVar(X, r)
X |
A point pattern (object of class |
r |
A numeric vector of non-negative values at which the K-function
for |
The vector r
would normally have entries in increasing
order and would have a first entry equal to 0. It may be wise
to construct r
as Kest(X)$r
, but this is not
required.
A number vector, of length equal to length(r)
whose
entries are the variances of K(r)
where $K(r)$ is equal to
as.function(Kest(X))
.
Rolf Turner rolfturner@posteo.net
Hahn, Ute (2012) A studentized permutation test for the comparison of spatial point patterns, Journal of the American Statistical Association, 107, pp. 754 – 764, DOI: 10.1080/01621459.2012.688463.
Kest()
if(requireNamespace("spatstat.random")) {
X <- spatstat.random::rpoispp(100)
vKX1 <- ripVar(X,r=0.05*(1:5))
if(requireNamespace("spatstat.explore")) {
r <- spatstat.explore::Kest(X)$r
vKX2 <- ripVar(X,r=r)
plot(r,vKX2,type="l")
points(0.05*(1:5),vKX1)
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.