markcrosscorr {spatstat.explore}R Documentation

Mark Cross-Correlation Function

Description

Given a spatial point pattern with several columns of marks, this function computes the mark correlation function between each pair of columns of marks.

Usage

  markcrosscorr(X, r = NULL,
                correction = c("isotropic", "Ripley", "translate"),
                method = "density", ..., normalise = TRUE, Xname = NULL)

Arguments

X

The observed point pattern. An object of class "ppp" or something acceptable to as.ppp.

r

Optional. Numeric vector. The values of the argument rr at which the mark correlation function kf(r)k_f(r) should be evaluated. There is a sensible default.

correction

A character vector containing any selection of the options "isotropic", "Ripley", "translate", "translation", "none" or "best". It specifies the edge correction(s) to be applied. Alternatively correction="all" selects all options.

method

A character vector indicating the user's choice of density estimation technique to be used. Options are "density", "loess", "sm" and "smrep".

...

Arguments passed to the density estimation routine (density, loess or sm.density) selected by method.

normalise

If normalise=FALSE, compute only the numerator of the expression for the mark correlation.

Xname

Optional character string name for the dataset X.

Details

First, all columns of marks are converted to numerical values. A factor with mm possible levels is converted to mm columns of dummy (indicator) values.

Next, each pair of columns is considered, and the mark cross-correlation is defined as

kmm(r)=E0u[Mi(0)Mj(u)]E[Mi,Mj] k_{mm}(r) = \frac{E_{0u}[M_i(0) M_j(u)]}{E[M_i,M_j]}

where E0uE_{0u} denotes the conditional expectation given that there are points of the process at the locations 00 and uu separated by a distance rr. On the numerator, Mi(0)M_i(0) and Mj(u)M_j(u) are the marks attached to locations 00 and uu respectively in the iith and jjth columns of marks respectively. On the denominator, MiM_i and MjM_j are independent random values drawn from the iith and jjth columns of marks, respectively, and EE is the usual expectation.

Note that kmm(r)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 kmm(r)1k_{mm}(r) \equiv 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.

Value

A function array (object of class "fasp") containing the mark cross-correlation functions for each possible pair of columns of marks.

Author(s)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner rolfturner@posteo.net and Ege Rubak rubak@math.aau.dk.

See Also

markcorr

Examples

  # The dataset 'betacells' has two columns of marks:
  #       'type' (factor)
  #       'area' (numeric)
  if(interactive()) plot(betacells)
  plot(markcrosscorr(betacells))

[Package spatstat.explore version 3.3-1 Index]