markcrosscorr | R Documentation |
Given a spatial point pattern with several columns of marks, this function computes the mark correlation function between each pair of columns of marks.
markcrosscorr(X, r = NULL, correction = c("isotropic", "Ripley", "translate"), method = "density", ..., normalise = TRUE, Xname = NULL)
X |
The observed point pattern.
An object of class |
r |
Optional. Numeric vector. The values of the argument r at which the mark correlation function k[f](r) should be evaluated. There is a sensible default. |
correction |
A character vector containing any selection of the
options |
method |
A character vector indicating the user's choice of
density estimation technique to be used. Options are
|
... |
Arguments passed to the density estimation routine
( |
normalise |
If |
Xname |
Optional character string name for the dataset |
First, all columns of marks are converted to numerical values. A factor with m possible levels is converted to m columns of dummy (indicator) values.
Next, each pair of columns is considered, and the mark cross-correlation is defined as
k[mm](r) = E[0u](M(i,0) * M(j,u))/E(Mi * Mj)
where E[0u] denotes the conditional expectation given that there are points of the process at the locations 0 and u separated by a distance r. On the numerator, M(i,0) and M(j,u) are the marks attached to locations 0 and u respectively in the ith and jth columns of marks respectively. On the denominator, Mi and Mj are independent random values drawn from the ith and jth columns of marks, respectively, and E is the usual expectation.
Note that k[mm](r) is not a “correlation”
in the usual statistical sense. It can take any
nonnegative real value. The value 1 suggests “lack of correlation”:
if the marks attached to the points of X
are independent
and identically distributed, then
k[mm](r) = 1.
The argument X
must be a point pattern (object of class
"ppp"
) or any data that are acceptable to as.ppp
.
It must be a marked point pattern.
The cross-correlations are estimated in the same manner as
for markcorr
.
A function array (object of class "fasp"
) containing
the mark cross-correlation functions for each possible pair
of columns of marks.
and \ege
markcorr
# The dataset 'betacells' has two columns of marks: # 'type' (factor) # 'area' (numeric) if(interactive()) plot(betacells) plot(markcrosscorr(betacells))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.