Kmark | R Documentation |
Estimates the mark-weighted K
function
of a marked point pattern.
Kmark(X, f = NULL, r = NULL,
correction = c("isotropic", "Ripley", "translate"), ...,
f1 = NULL, normalise = TRUE, returnL = FALSE, fargs = NULL)
markcorrint(X, f = NULL, r = NULL,
correction = c("isotropic", "Ripley", "translate"), ...,
f1 = NULL, normalise = TRUE, returnL = FALSE, fargs = NULL)
X |
The observed point pattern.
An object of class |
f |
Optional. Test function |
r |
Optional. Numeric vector. The values of the argument |
correction |
A character vector containing any selection of the
options |
... |
Ignored. |
f1 |
An alternative to |
normalise |
If |
returnL |
Compute the analogue of the K-function if |
fargs |
Optional. A list of extra arguments to be passed to the function
|
The functions Kmark
and markcorrint
are identical.
(Eventually markcorrint
will be deprecated.)
The mark-weighted K
function K_f(r)
of a marked point process (Penttinen et al, 1992)
is a generalisation of Ripley's K
function, in which the contribution
from each pair of points is weighted by a function of their marks.
If the marks of the two points are m_1, m_2
then
the weight is proportional to f(m_1, m_2)
where
f
is a specified test function.
The mark-weighted K
function is defined so that
\lambda K_f(r) = \frac{C_f(r)}{E[ f(M_1, M_2) ]}
where
C_f(r) =
E \left[
\sum_{x \in X}
f(m(u), m(x))
1{0 < ||u - x|| \le r}
\; \big| \;
u \in X
\right]
for any spatial location u
taken to be a typical point of
the point process X
. Here ||u-x||
is the
euclidean distance between u
and x
, so that the sum
is taken over all random points x
that lie within a distance
r
of the point u
. The function C_f(r)
is
the unnormalised mark-weighted K
function.
To obtain K_f(r)
we standardise C_f(r)
by dividing by E[f(M_1,M_2)]
, the expected value of
f(M_1,M_2)
when M_1
and M_2
are
independent random marks with the same distribution as the marks in
the point process.
Under the hypothesis of random labelling, the
mark-weighted K
function
is equal to Ripley's K
function,
K_f(r) = K(r)
.
The mark-weighted K
function is sometimes called the
mark correlation integral because it is related to the
mark correlation function k_f(r)
and the pair correlation function g(r)
by
K_f(r) = 2 \pi \int_0^r s k_f(s) \, g(s) \, {\rm d}s
See markcorr
for a definition of the
mark correlation function.
Given a marked point pattern X
,
this command computes edge-corrected estimates
of the mark-weighted K
function.
If returnL=FALSE
then the estimated
function K_f(r)
is returned;
otherwise the function
L_f(r) = \sqrt{K_f(r)/\pi}
is returned.
An object of class "fv"
(see fv.object
).
Essentially a data frame containing numeric columns
r |
the values of the argument |
theo |
the theoretical value of |
together with a column or columns named
"iso"
and/or "trans"
,
according to the selected edge corrections. These columns contain
estimates of the mark-weighted K
function K_f(r)
obtained by the edge corrections named (if returnL=FALSE
).
and \rolf
Penttinen, A., Stoyan, D. and Henttonen, H. M. (1992) Marked point processes in forest statistics. Forest Science 38 (1992) 806-824.
Illian, J., Penttinen, A., Stoyan, H. and Stoyan, D. (2008) Statistical analysis and modelling of spatial point patterns. Chichester: John Wiley.
markcorr
to estimate the mark correlation function.
# CONTINUOUS-VALUED MARKS:
# (1) Spruces
# marks represent tree diameter
# mark correlation function
ms <- Kmark(spruces)
plot(ms)
# (2) simulated data with independent marks
X <- rpoispp(100)
X <- X %mark% runif(npoints(X))
Xc <- Kmark(X)
plot(Xc)
# MULTITYPE DATA:
# Hughes' amacrine data
# Cells marked as 'on'/'off'
M <- Kmark(amacrine, function(m1,m2) {m1==m2},
correction="translate")
plot(M)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.