Compute \(K_\textrm{global}\)
Kglobal(X, lambda=NULL, ..., sigma=bw.CvL(X), r=NULL, rmax=NULL, breaks=NULL,
normtol=.005, discrete.lambda=FALSE,
interpolate=TRUE, interpolate.fac=10, isotropic=TRUE,
leaveoneout=TRUE, exp_prs=NULL,
interpolate.maxdx=diameter(as.owin(X))/100, dump=FALSE)Kcross.global(X, Y, lambdaX=NULL, lambdaY=NULL, ..., sigma=bw.CvL(X), r=NULL,
rmax=NULL, breaks=NULL, normtol=.005,
discrete.lambda=FALSE, interpolate=TRUE, isotropic=TRUE,
interpolate.fac=10, leaveoneout=TRUE, exp_prs=NULL,
interpolate.maxdx=diameter(as.owin(X))/100, dump=FALSE)
The return value is an object of class fv, just as for Kest
and Kinhom. The object contains columns r, theo, and
global, corresponding respectively to the argument \(r\), the theoretical
values of \(K(r)\) for a Poisson process, and \(K_\mathrm{global}(r)\).
point process of type ppp, on which to evaluate the (cross) \(K\)-function
intensity function estimates corresponding to X and Y. If omitted, intensity
functions will be computed using density.ppp or densityfun.ppp
(see discrete.lambda below)
extra args passed to density.ppp or densityfun.ppp, if applicable.
Bandwidth value to use for kernel-based intensity estimation, intensity functions and
exp_prs are not provided by the user.
Values of \(r\) to evaluate \(K(r)\) at. If omitted, a sensible default
is chosen, using the same conventions as Kest and
Kinhom.
Maximum \(r\) to evaluate \(K(r)\) at. rmax is used to generate values for r,
if omitted. If missing, a sensible default is chosen.
For internal use only.
A tolerance to use for expectedPairs or expectedCrossPairs when computing monte-carlo estimates of the normalizing factor \(\gamma\). Expressed as a maximum fractional standard error.
If TRUE, and intensity function(s) are not supplied, estimate intensities by
interpolating the values on a discrete lattice (using interp.im and
density.ppp), instead of exactly (using densityfun.ppp).
If TRUE, evaluate the expectedCrossPairs on a lattice and interpolate,
rather than at the exact displacements observed in the pattern.
If interpolate, the lattice spacing will be sigma/interpolate.fac.
Set to TRUE to use the isotropic estimators \(\gamma_\textrm{iso}\).
Use the leave-one-out estimator for \(\gamma\). See Shaw et al, 2020 for details.
A function that returns values for
\(\gamma_\textrm{iso}(r)\). If \(\gamma\) is
known explicitly, or the same calculation is being used for several
point patterns, it can be much faster to compute it once and provide the function
as exp_prs, since the computation of \(\gamma\) is usually the
slowest part.
Upper bound on allowable lattice spacing for interpolation.
For debugging purposes, include computed values of \(\gamma\) with the output,
as attrs.
Thomas Shaw <shawtr@umich.edu>
T Shaw, J Møller, R Waagepetersen. 2020. “Globally Intensity-Reweighted Estimators for \(K\)- and pair correlation functions”. arXiv:2004.00527 [stat.ME].
expectedPairs
rho <- funxy(function(x,y) 80*(1+x), owin())
X <- rpoispp(rho)
K <- Kglobal(X)
#plot(K)
Run the code above in your browser using DataLab