Distance functions (such as G, J, K, L, and g) can also be defined for point patterns that are "marked" with a categorical mark variable, called a type. Usually you consider mark variables that have more than one type to define distance functions. When distance functions are defined between two types, they are called cross-type distance functions. For any pair of types i and j, the cross-distance functions , , , , and can be defined analogously to the single-type distance functions. The interpretation of cross-type distance functions is slightly different from the interpretation of single type functions. Suppose that X is the point pattern, refers to the subpattern of points of type j; refers to the subpattern of points of type i, and represents the intensity of the subpattern . Then the interpretation is to treat as a homogeneous Poisson process and independent of . If the computed empirical cross-type function is identical to the function that corresponds to a homogeneous Poisson process, then and can be treated as independent of each other.
The empirical cross-G-function, , is defined as the distribution of the distance from a point of type i in to the nearest point of type j in . Formally, can be written as
where is an edge correction and is the distance from a point of type i to the nearest point of type j. If the two subpatterns and are independent of each other, then the theoretical cross-G-function is
The empirical cross-type J-function, , can be defined again in terms of the function and the empty-space F function for subpattern as
where is the empty-space function for the subpattern . If the two subpatterns and are independent of each other, then the theoretical cross-J-function is .
The empirical cross-type K function, , is times the expected number of points of type j within a distance r of a typical point of type i. Formally, can be written as
where is an edge correction. If the two subpatterns and are independent of each other, then the theoretical cross-K-function is .
The empirical cross-type L function, , is a transformation of . Formally, can be written as
If the two subpatterns and are independent of each other, then the theoretical cross-type L-function is .
The empirical cross-type pair correlation function, , is a kernel estimate of the form
Based on the definition of Stoyan and Stoyan (1994), can be written as
A border-edge-corrected version of can be written as
where is the distance of to the boundary of W, which is denoted as . If the two subpatterns and are independent of each other, then the theoretical cross-type pair correlation function is .