expectedPairs {globalKinhom}R Documentation

Expected pairs in an inhomogeneous poisson process

Description

Compute the expected number of pairs at a given displacement h in a poisson process with a given intensity function. This corresponds to the integrals \gamma of Shaw et al. 2020. The various functions correspond to the univariate and bivariate versions of the anisotropic or isotropic versions of \gamma. The final two options (expectedPairs_kernloo and expectedPairs_iso_kernloo), provide implementations of the leave-out kernel estimates of \gamma: \bar \gamma(h) and \bar \gamma ^\mathrm{iso}(r). In those cases, the point pattern X itself is passed to the routine, rather than the (true or estimated) intensities rho etc. The estimators for \bar \gamma(h) are only applicable to univariate processes. See Shaw et al, 2020 for details.

Usage

expectedPairs(rho, hx, hy=NULL, method=c("mc", "lattice"),
                tol=.005, dx=diff(as.owin(rho)$xrange)/200, maxeval=1e6,
                maxsamp=5e3)

expectedCrossPairs(rho1, rho2=NULL, hx, hy=NULL, method=c("mc", "lattice"),
                tol=.005, dx=diff(as.owin(rho1)$xrange)/200, maxeval=1e6,
                maxsamp=5e3)

expectedPairs_iso(rho, r, tol=.001, maxeval=1e6, maxsamp=5e3)

expectedCrossPairs_iso(rho1, rho2=NULL, r, tol=.001, maxeval=1e6, maxsamp=5e3)

expectedPairs_kernloo(X, hx,hy, sigma=bw.CvL, tol=.005, maxeval=1e6,
                            maxsamp=5e3, leaveoneout=TRUE)

expectedPairs_iso_kernloo(X, r, sigma=bw.CvL, tol=.001, maxeval=1e6,
                                    maxsamp=5e3, leaveoneout=TRUE)

Arguments

rho1, rho2, rho

Intensity functions, either of class im or funxy. This may be produced by density.ppp or densityfun.ppp, or provided by a fitted intensity model.

X

Point pattern of class ppp with the points of the pattern for which \bar \gamma is to be estimated.

hx, hy

For expectedPairs and expectedCrossPairs (i.e. \gamma(h)), the displacements h \in \textrm{R}^2 to evaluate \gamma at. These can be in any format supported by xy.coords.

r

For the isotropic versions \gamma^\mathrm{iso}(r), the separations r at which \gamma^\mathrm{iso} is to be evaluated.

method

Either mc (the default) or lattice. Compute integral using monte-carlo or on a lattice.

tol

A tolerance for how precise the integral should be. This is compared to a standard error for the mc estimate.

sigma

Smoothing bandwidth for direct kernel-based estimators \bar \gamma.

leaveoneout

Use leave-out estimators. This should generally be true except for the purpose of evaluating the bias of the standard estimators. See Shaw et al 2020 for details.

maxeval

Maximum number of evaluations of rho per iteration. Prevents memory-related crashes that can occur.

maxsamp

Maximum number of monte carlo samples per iteration. If this is too large, you may do more work than required to achieve tol.

dx

if method=="lattice", a lattice spacing for the computation. defaults to .01.

Value

The return value is a numeric vector with length equal to the number of displacements h passed

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

pcfglobal, Kglobal, which use these functions to compute the normalization functions \gamma.


[Package globalKinhom version 0.1.8 Index]