Kglobal {globalKinhom}R Documentation

(cross) K functions with a global intensity reweighting

Description

Compute K_\textrm{global}

Usage

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)

Arguments

X, Y

point process of type ppp, on which to evaluate the (cross) K-function

lambda, lambdaX, lambdaY

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.

sigma

Bandwidth value to use for kernel-based intensity estimation, intensity functions and exp_prs are not provided by the user.

r

Values of r to evaluate K(r) at. If omitted, a sensible default is chosen, using the same conventions as Kest and Kinhom.

rmax

Maximum r to evaluate K(r) at. rmax is used to generate values for r, if omitted. If missing, a sensible default is chosen.

breaks

For internal use only.

normtol

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.

discrete.lambda

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).

interpolate

If TRUE, evaluate the expectedCrossPairs on a lattice and interpolate, rather than at the exact displacements observed in the pattern.

interpolate.fac

If interpolate, the lattice spacing will be sigma/interpolate.fac.

isotropic

Set to TRUE to use the isotropic estimators \gamma_\textrm{iso}.

leaveoneout

Use the leave-one-out estimator for \gamma. See Shaw et al, 2020 for details.

exp_prs

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.

interpolate.maxdx

Upper bound on allowable lattice spacing for interpolation.

dump

For debugging purposes, include computed values of \gamma with the output, as attrs.

Value

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).

Author(s)

Thomas Shaw <shawtr@umich.edu>

References

T Shaw, J Møller, R Waagepetersen. 2020. “Globally Intensity-Reweighted Estimators for K- and pair correlation functions”. arXiv:2004.00527 [stat.ME].

See Also

expectedPairs

Examples

rho <- funxy(function(x,y) 80*(1+x), owin())
X <- rpoispp(rho)
K <- Kglobal(X)
#plot(K)

[Package globalKinhom version 0.1.7 Index]