Estimation of the space-time pair correlation function

Share:

Description

Compute an estimate of the space-time pair correlation function.

Usage

1
2
PCFhat(xyt, s.region, t.region, dist, times, lambda,
ks="box", hs, kt="box", ht, correction = "isotropic") 

Arguments

xyt

coordinates and times (x,y,t) of the point pattern.

s.region

two-column matrix specifying polygonal region containing all data locations. If s.region is missing, the bounding box of xyt[,1:2] is considered.

t.region

vector containing the minimum and maximum values of the time interval. If t.region is missing, the range of xyt[,3] is considered.

dist

vector of distances u at which g(u,v) is computed.

times

vector of times v at which g(u,v) is computed.

lambda

vector of values of the space-time intensity function evaluated at the points (x,y,t) in SxT. If lambda is missing, the estimate of the space-time pair correlation function is computed considering n/|SxT| as an estimate of the space-time intensity.

ks

Kernel function for the spatial distances. Default is the "box" kernel. Can also be "epanech" for the Epanechnikov kernel or "gaussian" or "biweight".

hs

Bandwidth of the kernel function ks.

kt

Kernel function for the temporal distances. Default is the "box" kernel. Can also be "epanech" for the Epanechnikov kernel or "gaussian" or "biweight".

ht

Bandwidth of the kernel function kt.

correction

A character vector specifying the edge correction(s) to be applied among "isotropic", "border", "modified.border", "translate" and "none" (see Details). The default is "isotropic".

Details

An approximately unbiased estimator for the space-time pair correlation function, based on data giving the locations of events xi: i=1...,n on a spatio-temporal region SxT, where S is an arbitrary polygon and T a time interval:

g(u,v) = 1/|SxT| 1/(4 pi u) sum_{i=1,...,n} sum_{j=1,...,n; j != i} 1/wij ks(u - ||si-sj||)kt(v-|ti-tj|)/(lambda(xi)lambda(xj))

where lambda(xi) is the intensity at xi=(si,ti) and wij is an edge correction factor to deal with spatial-temporal edge effects. The edge correction methods implemented are:

isotropic: wij = |S x T| wij(s) wij(t), where the temporal edge correction factor wij(t)=1 if both ends of the interval of length 2|ti-tj| centred at ti lie within T and wij(t)=1/2 otherwise and wij(s) is the proportion of the circumference of a circle centred at the location si with radius ||si-sj|| lying in S (also called Ripley's edge correction factor).

border: wij=(sum_j 1{d(sj,S)>u ; d(tj,T)>v}/ lambda(xj)) / 1{d(si,S)>u ; d(ti,T)>v}, where d(si,S) denotes the distance between si and the boundary of S and d(ti,T) the distance between ti and the boundary of T.

modified.border: wij = |S(-u) x T(-v)| / 1{d(si,S)>u ; d(ti,T)>v}, where S(-u) and T(-v) are the eroded spatial and temporal region respectively, obtained by trimming off a margin of width u and v from the border of the original region.

translate: |S intersect S(si-sj) x T intersect T(ti-tj)|, where S(si-sj) and T(ti-tj) are the translated spatial and temporal regions.

none: No edge correction is performed and |S x T|.

ks() and kt() denotes kernel functions with bandwidth hs and ht. Experience with pair correlation function estimation recommends box kernels (the default), see Illian et al. (2008). Epanechnikov, Gaussian and biweight kernels are also implemented. Whatever the kernel function, if the bandwidth is missing, a value is obtain from the function dpik of the package KernSmooth. Note that the bandwidths play an important role and their choice is crucial in the quality of the estimators as they heavily influence their variance.

Value

A list containing:

pcf

ndist x ntimes matrix containing values of g(u,v).

dist, times

parameters passed in argument.

kernel

a vector of names and bandwidths of the spatial and temporal kernels.

correction

the name(s) of the edge correction method(s) passed in argument.

Author(s)

Edith Gabriel <edith.gabriel@univ-avignon.fr>

References

Gabriel E. (2014) Estimating second-order characteristics of inhomogeneous spatio-temporal point processes: influence of edge correction methods and intensity estimates. Methodology and computing in Applied Probabillity, 16(1).

Gabriel E., Diggle P. (2009) Second-order analysis of inhomogeneous spatio-temporal point process data. Statistica Neerlandica, 63, 43–51.

Gabriel E., Rowlingson B., Diggle P. (2013) stpp: an R package for plotting, simulating and analyzing Spatio-Temporal Point Patterns. Journal of Statistical Software, 53(2), 1–29.

Baddeley A, Turner R (2000) Practical maximum pseudolikelihood for spatial point patterns. Aust NZ J Stat 42, 283–322.

Illian JB, Penttinen A, Stoyan H and Stoyan, D. (2008). Statistical Analysis and Modelling of Spatial Point Patterns. John Wiley and Sons, London.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
## Not run: 
## First example
#################
data(fmd)
data(northcumbria)
FMD<-as.3dpoints(fmd[,1]/1000,fmd[,2]/1000,fmd[,3])
Northcumbria=northcumbria/1000

# estimation of the temporal intensity
Mt<-density(FMD[,3],n=1000)
mut<-Mt$y[findInterval(FMD[,3],Mt$x)]*dim(FMD)[1]

# estimation of the spatial intensity
h<-mse2d(as.points(FMD[,1:2]), Northcumbria, nsmse=50, range=4)
h<-h$h[which.min(h$mse)]
Ms<-kernel2d(as.points(FMD[,1:2]), Northcumbria, h, nx=5000, ny=5000)
atx<-findInterval(x=FMD[,1],vec=Ms$x)
aty<-findInterval(x=FMD[,2],vec=Ms$y)
mhat<-NULL
for(i in 1:length(atx)) mhat<-c(mhat,Ms$z[atx[i],aty[i]])

# estimation of the pair correlation function
g1 <- PCFhat(xyt=FMD, dist=1:20, times=1:20, lambda=mhat*mut/dim(FMD)[1],
 s.region=northcumbria/1000,t.region=c(1,200))

# plotting the estimation 

plotPCF(g1)
plotPCF(g1,type="persp",theta=-65,phi=35) 

## Second example
###################

xyt=rpp(lambda=200)
g2=PCFhat(xyt$xyt,dist=seq(0,0.16,by=0.02),
times=seq(0,0.16,by=0.02),correction=c("border","translate"))

plotPCF(g2,type="contour",which="border")


## End(Not run)