Title: | Inhomogeneous K- And Pair Correlation Functions Using Global Estimators |
---|---|
Description: | Second-order summary statistics K- and pair-correlation functions describe interactions in point pattern data. This package provides computations to estimate those statistics on inhomogeneous point processes, using the methods of in T Shaw, J Møller, R Waagepetersen, 2020 <doi:10.48550/arXiv.2004.00527>. |
Authors: | Thomas Shaw [aut, cre], Ege Rubak [ctb], Adrian Baddeley [ctb], Rolf Turner [ctb] |
Maintainer: | Thomas Shaw <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.1.9 |
Built: | 2024-12-07 06:26:44 UTC |
Source: | CRAN |
Second-order summary statistics K- and pair-correlation functions describe interactions in point pattern data. This package provides computations to estimate those statistics on inhomogeneous point processes, using the methods of in T Shaw, J Møller, R Waagepetersen, 2020 <doi:10.48550/arXiv.2004.00527>.
The DESCRIPTION file:
Package: | globalKinhom |
Type: | Package |
Title: | Inhomogeneous K- And Pair Correlation Functions Using Global Estimators |
Version: | 0.1.9 |
Date: | 2024-10-07 |
Encoding: | UTF-8 |
Authors@R: | c(person("Thomas", "Shaw", role=c("aut", "cre"), email="[email protected]"), person("Ege", "Rubak", role="ctb"), person("Adrian", "Baddeley", role="ctb"), person("Rolf", "Turner", role="ctb")) |
Author: | Thomas Shaw [aut, cre], Ege Rubak [ctb], Adrian Baddeley [ctb], Rolf Turner [ctb] |
Maintainer: | Thomas Shaw <[email protected]> |
Depends: | R (>= 3.5.0), spatstat.explore (>= 3.0) |
Imports: | stats, utils, grDevices, spatstat.geom (>= 3.1), spatstat.random (>= 2.1.0), spatstat.univar |
Description: | Second-order summary statistics K- and pair-correlation functions describe interactions in point pattern data. This package provides computations to estimate those statistics on inhomogeneous point processes, using the methods of in T Shaw, J Møller, R Waagepetersen, 2020 <doi:10.48550/arXiv.2004.00527>. |
License: | GPL (>= 2) |
NeedsCompilation: | yes |
Packaged: | 2024-10-07 19:35:07 UTC; tshaw |
Repository: | CRAN |
Date/Publication: | 2024-10-07 20:00:02 UTC |
Index of help topics:
Kglobal (cross) K functions with a global intensity reweighting expectedPairs Expected pairs in an inhomogeneous poisson process globalKinhom-package Inhomogeneous K- And Pair Correlation Functions Using Global Estimators pcfglobal (cross) pair correlation functions with a global intensity reweighting
This package accompanies Shaw et al (2020). It provides “global”
estimators for the non-parametric - and pair correlation functions, which
summarize the second order interactions of second-order intensity-reweighted
stationary (SOIRS) point processes. These estimators provide an alternative to
those proposed by Baddeley et al (2000) for SOIRS point processes, which we
refer to as “local” estimators. The local estimators are implemented in
the
spatstat.explore
package as pcfinhom
and
Kinhom
, with pcfcross.inhom
and
Kcross.inhom
for the corresponding cross-pcf and
cross--function.
Where possible, the interfaces are made to match those used by the spatstat.explore package.
Thomas Shaw [aut, cre], Ege Rubak [ctb], Adrian Baddeley [ctb], Rolf Turner [ctb]
Maintainer: Thomas Shaw <[email protected]>
T Shaw, J Møller, R Waagepetersen. 2020. “Globally Intensity-Reweighted Estimators for
- and pair correlation functions”. arXiv:2004.00527 [stat.ME].
A Baddeley, J Møller, R Waagepetersen. 2000. “Non- and Semi-Parametric Estimation of Interaction in Inhomogeneous Point Patterns”. Statistica Neerlandica 54, 329-350.
spatstat.explore
, Kglobal
, link{pcfglobal}
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
of Shaw et al. 2020. The various functions correspond
to the univariate and bivariate versions of the anisotropic or isotropic
versions of
. The final two options (
expectedPairs_kernloo
and expectedPairs_iso_kernloo
), provide implementations of the leave-out
kernel estimates of :
and
. 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 are only applicable
to univariate processes. See Shaw et al, 2020 for details.
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)
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)
rho1 , rho2 , rho
|
Intensity functions, either of class |
X |
Point pattern of class |
hx , hy
|
For expectedPairs and expectedCrossPairs (i.e. |
r |
For the isotropic versions |
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 |
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. |
The return value is a numeric vector with length equal to the number of displacements h passed
Thomas Shaw <[email protected]>
T Shaw, J Møller, R Waagepetersen. 2020. “Globally Intensity-Reweighted Estimators for
- and pair correlation functions”. arXiv:2004.00527 [stat.ME].
pcfglobal
, Kglobal
, which use these functions to compute
the normalization functions .
Compute
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)
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)
X , Y
|
point process of type |
lambda , lambdaX , lambdaY
|
intensity function estimates corresponding to |
... |
extra args passed to density.ppp or densityfun.ppp, if applicable. |
sigma |
Bandwidth value to use for kernel-based intensity estimation, intensity functions and
|
r |
Values of |
rmax |
Maximum |
breaks |
For internal use only. |
normtol |
A tolerance to use for expectedPairs or expectedCrossPairs when computing monte-carlo
estimates of the normalizing factor |
discrete.lambda |
If |
interpolate |
If |
interpolate.fac |
If |
isotropic |
Set to |
leaveoneout |
Use the leave-one-out estimator for |
exp_prs |
A function that returns values for
|
interpolate.maxdx |
Upper bound on allowable lattice spacing for interpolation. |
dump |
For debugging purposes, include computed values of |
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 , the theoretical
values of
for a Poisson process, and
.
Thomas Shaw <[email protected]>
T Shaw, J Møller, R Waagepetersen. 2020. “Globally Intensity-Reweighted Estimators for
- and pair correlation functions”. arXiv:2004.00527 [stat.ME].
rho <- funxy(function(x,y) 80*(1+x), owin()) X <- rpoispp(rho) K <- Kglobal(X) #plot(K)
rho <- funxy(function(x,y) 80*(1+x), owin()) X <- rpoispp(rho) K <- Kglobal(X) #plot(K)
Compute or
pcfglobal(X, lambda=NULL, ..., sigma=bw.CvL(X), r=NULL, rmax=NULL, kernel="epanechnikov", bw=NULL, stoyan=0.15, normtol=.005, ratio=FALSE, discrete.lambda=FALSE, divisor=c("r", "d"), leaveoneout=TRUE, interpolate=TRUE, interpolate.fac=10, exp_prs=NULL, interpolate.maxdx=diameter(as.owin(X))/100, dump=FALSE) pcfcross.global(X,Y, lambdaX=NULL, lambdaY=NULL, ..., sigma=bw.CvL(X), r=NULL, rmax=NULL, kernel="epanechnikov", bw=NULL, stoyan=0.15, normtol=.005, ratio=FALSE, discrete.lambda=FALSE, divisor=c("r", "d"), analytical=NULL, interpolate=TRUE, interpolate.fac=10, exp_prs=NULL, interpolate.maxdx=diameter(as.owin(X))/100, dump=FALSE)
pcfglobal(X, lambda=NULL, ..., sigma=bw.CvL(X), r=NULL, rmax=NULL, kernel="epanechnikov", bw=NULL, stoyan=0.15, normtol=.005, ratio=FALSE, discrete.lambda=FALSE, divisor=c("r", "d"), leaveoneout=TRUE, interpolate=TRUE, interpolate.fac=10, exp_prs=NULL, interpolate.maxdx=diameter(as.owin(X))/100, dump=FALSE) pcfcross.global(X,Y, lambdaX=NULL, lambdaY=NULL, ..., sigma=bw.CvL(X), r=NULL, rmax=NULL, kernel="epanechnikov", bw=NULL, stoyan=0.15, normtol=.005, ratio=FALSE, discrete.lambda=FALSE, divisor=c("r", "d"), analytical=NULL, interpolate=TRUE, interpolate.fac=10, exp_prs=NULL, interpolate.maxdx=diameter(as.owin(X))/100, dump=FALSE)
X , Y
|
point process of type |
lambda , lambdaX , lambdaY
|
intensity function estimates corresponding to |
... |
extra args passed to density.ppp or densityfun.ppp, if applicable. |
sigma |
Bandwidth value to use for kernel-based intensity estimation, intensity functions and
|
r |
Values of |
rmax |
Maximum |
kernel |
Kernel type for smoothing of pcf. |
bw |
Kernel bandwidth for smoothing of pcf. |
stoyan |
Coefficient for Stoyan's bandwidth selection rule. See
|
normtol |
A tolerance to use for expectedPairs or expectedCrossPairs when computing monte-carlo
estimates of the normalizing factor |
ratio |
If |
divisor |
Whether to use the evaluation distance ( |
analytical |
If |
discrete.lambda |
If |
interpolate |
If |
interpolate.fac |
If |
leaveoneout |
Use the leave-one-out estimator for |
exp_prs |
A function that returns values for
|
interpolate.maxdx |
Upper bound on allowable lattice spacing for interpolation. |
dump |
For debugging purposes, include computed values of |
The return value is an object of class fv
,
just as for pcf
and
pcfinhom
. The object contains columns r
,
theo
, and global
, corresponding respectively to the argument
, the theoretical values of
for a Poisson process, and
.
Thomas Shaw <[email protected]>
T Shaw, J Møller, R Waagepetersen. 2020. “Globally Intensity-Reweighted Estimators for
- and pair correlation functions”. arXiv:2004.00527 [stat.ME].
rho <- funxy(function(x,y) 80*(1+x), owin()) X <- rpoispp(rho) g <- pcfglobal(X) #plot(g)
rho <- funxy(function(x,y) 80*(1+x), owin()) X <- rpoispp(rho) g <- pcfglobal(X) #plot(g)