Description Usage Arguments Details Value Author(s) References Examples
Compute an estimate of the space-time pair correlation function.
1 2 |
xyt |
coordinates and times (x,y,t) of the point pattern. |
s.region |
two-column matrix specifying polygonal region containing
all data locations.
If |
t.region |
vector containing the minimum and maximum values of
the time interval.
If |
dist |
vector of distances u at which K(u,v) is computed. |
times |
vector of times v at which K(u,v) is computed. |
lambda |
vector of values of the space-time intensity function
evaluated at the points (x,y,t) in SxT.
If |
ks |
Kernel function for the spatial distances. Default is
the |
hs |
Bandwidth of the kernel function |
kt |
Kernel function for the temporal distances. Default
is the |
ht |
Bandwidth of the kernel function |
correction |
logical value. If |
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=[T0,T1]:
g(u,v) = 1/|SxT| sum_{i=1,...,n} sum_{j=1,...,n; j \neq j} 1/(wij*vij) ks(u - ||si-sj||)kt(v-|ti-tj|)/(lambda(xi)lambda(xj))
To deal with spatial edge-effects, we use Ripley's method, in which wij is the proportion of the circle centered on si and passing through sj, i.e. of radius uij=||si-sj||, that lies inside S. To deal with temporal edge effects, vij is equal to 1 if both ends of the interval of length 2|ti-tj| centred at ti lie within T and 1/2 otherwise.
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.
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. |
Edith Gabriel <edith.gabriel@univ-avignon.fr>
Illian JB, Penttinen A, Stoyan H and Stoyan, D. (2008). Statistical Analysis and Modelling of Spatial Point Patterns. John Wiley and Sons, London.
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 | ## Not run:
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
g <- 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(g)
plotPCF(g,persp=TRUE,theta=-65,phi=35)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.