Learn R Programming

spatstat.explore (version 3.6-0)

markequal: Mark Equality Function

Description

Estimate the mark equality function of a multitype point pattern.

Usage

markequal(X, r=NULL,
         correction=c("isotropic", "Ripley", "translate"),
         method="density", ..., normalise=FALSE)

Arguments

Value

An object of class "fv" (see fv.object).

Essentially a data frame containing numeric columns

r

the values of the argument \(r\) at which the mark equality function \(e(r)\) has been estimated

theo

the theoretical value of \(e(r)\) when the marks attached to different points are independent

together with a column or columns named

"iso" and/or "trans", according to the selected edge corrections. These columns contain estimates of the function \(e(r)\)

obtained by the edge corrections named.

The returned object also has an attribute "smooth.args" giving the smoothing parameters that were used to calculate the estimate.

Details

The mark equality function \(e(r)\) of a multitype point process \(X\) is a measure of the dependence between the types of two points of the process a distance \(r\) apart.

Informally \(e(r)\) is defined as the conditional probability, given that there is a point of the process at a location \(u\) and another point of the process at a location \(v\) separated by a distance \(||u-v|| = r\), that the two points have the same type. See Stoyan and Stoyan (1994).

If the marks attached to the points of X are independent and identically distributed, then \(e(r) \equiv \sum_i p_i^2\) where \(p_i\) denotes the probability that a typical point is of type \(i\). Values larger than this, \(e(r) > \sum_i p_i^2\), indicate positive association between the types of neighbouring points, while smaller values indicate negative association.

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 multitype point pattern (a marked point pattern with factor-valued marks).

The argument r is the vector of values for the distance \(r\) at which \(e(r)\) is estimated. There is a sensible default.

This algorithm assumes that X can be treated as a realisation of a stationary (spatially homogeneous) random spatial point process in the plane, observed through a bounded window. The window (which is specified in X as Window(X)) may have arbitrary shape.

Biases due to edge effects are treated in the same manner as in Kest. The edge corrections implemented here are

isotropic/Ripley

Ripley's isotropic correction (see Ripley, 1988; Ohser, 1983). This is implemented only for rectangular and polygonal windows (not for binary masks) and is slow for complicated polygons.

translate

Translation correction (Ohser, 1983). Implemented for all window geometries.

none

No edge correction.

The option correction="none" should only be used if the number of data points is extremely large (otherwise an edge correction is needed to correct bias).

Note that the estimator assumes the process is stationary (spatially homogeneous).

The mark equality function is estimated using density estimation techniques. The user can choose between

"density"

which uses the standard kernel density estimation routine density, and works only for evenly-spaced r values;

"loess"

which uses the function loess in the package modreg;

"sm"

which uses the function sm.density in the package sm and is extremely slow;

"smrep"

which uses the function sm.density in the package sm and is relatively fast, but may require manual control of the smoothing parameter hmult.

References

Stoyan, D. and Stoyan, H. (1994) Fractals, random shapes and point fields: methods of geometrical statistics. John Wiley and Sons.

See Also

Mark connection function markconnect measures the dependence between each pair of types.

Multitype pair correlation pcfcross and multitype K-functions Kcross, Kdot.

Mark correlation markcorr and mark variogram markvario for numeric-valued marks.

Examples

Run this code
    # Hughes' amacrine data
    # Cells marked as 'on'/'off'
    E <- markequal(amacrine)
    plot(E)

Run the code above in your browser using DataLab