| Gcross.inhom {spatstat.explore} | R Documentation |
Inhomogeneous Multitype G Cross Function
Description
For a multitype point pattern,
estimate the inhomogeneous version of the cross G function,
which is the distribution of the distance
from a point of type i
to the nearest point of type j,
adjusted for spatially varying intensity.
Usage
Gcross.inhom(X, i, j,
lambda = NULL, lambdaI = NULL, lambdaJ = NULL,
lambdamin = NULL,
...,
r = NULL,
ReferenceMeasureMarkSetI = NULL,
ratio = FALSE)
Arguments
X |
The observed point pattern,
from which an estimate of the inhomogeneous cross type |
i |
The type (mark value)
of the points in |
j |
The type (mark value)
of the points in |
lambda |
Optional.
Values of the estimated intensity of the point process.
Either a pixel image (object of class |
lambdaI |
Optional.
Values of the estimated intensity of the sub-process of
points of type |
lambdaJ |
Optional.
Values of the the estimated intensity of the sub-process of
points of type |
lambdamin |
Optional. The minimum possible value of the intensity over the spatial domain. A positive numerical value. |
... |
Extra arguments passed to |
r |
vector of values for the argument |
ReferenceMeasureMarkSetI |
Optional. The total measure of the mark set. A positive number. |
ratio |
Logical value indicating whether to save ratio information. |
Details
This is a generalisation of the function Gcross
to include an adjustment for spatially inhomogeneous intensity,
in a manner similar to the function Ginhom.
The argument lambdaI supplies the values
of the intensity of the sub-process of points of type i.
It may be either
- a pixel image
(object of class
"im") which gives the values of the typeiintensity at all locations in the window containingX;- a numeric vector
containing the values of the type
iintensity evaluated only at the data points of typei. The length of this vector must equal the number of typeipoints inX.- a function
-
of the form
function(x,y)which can be evaluated to give values of the intensity at any locations. - a fitted point process model
-
(object of class
"ppm","kppm"or"dppm") whose fitted trend can be used as the fitted intensity. (Ifupdate=TRUEthe model will first be refitted to the dataXbefore the trend is computed.) - omitted:
-
if
lambdaIis omitted then it will be estimated using a leave-one-out kernel smoother.
If lambdaI is omitted, then it will be estimated using
a ‘leave-one-out’ kernel smoother.
Similarly the argument lambdaJ should contain
estimated values of the intensity of the points of type j.
It may be either a pixel image, a numeric vector of length equal
to the number of points in X, a function, or omitted.
The argument r is the vector of values for the
distance r at which G_{ij}(r) should be evaluated.
The values of r must be increasing nonnegative numbers
and the maximum r value must not exceed the radius of the
largest disc contained in the window.
Value
An object of class "fv" (see fv.object)
containing estimates of the inhomogeneous cross type G function.
Warnings
The argument i is interpreted as
a level of the factor X$marks. It is converted to a character
string if it is not already a character string.
The value i=1 does not
refer to the first level of the factor.
Author(s)
Adrian Baddeley Adrian.Baddeley@curtin.edu.au.
References
Cronie, O. and Van Lieshout, M.N.M. (2015) Summary statistics for inhomogeneous marked point processes. Annals of the Institute of Statistical Mathematics DOI: 10.1007/s10463-015-0515-z
See Also
Gcross,
Ginhom,
Gcross.inhom,
Gmulti.inhom.
Examples
X <- rescale(amacrine)
if(interactive() && require(spatstat.model)) {
## how to do it normally
mod <- ppm(X ~ marks * x)
lam <- fitted(mod, dataonly=TRUE)
lmin <- min(predict(mod)[["off"]]) * 0.9
} else {
## for package testing
lam <- intensity(X)[as.integer(marks(X))]
lmin <- intensity(X)[2] * 0.9
}
GC <- Gcross.inhom(X, "on", "off", lambda=lam, lambdamin=lmin)