Description Usage Arguments Details Value Author(s) References Examples
Compute an estimate of the Space-Time Inhomogeneous K-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 |
correction |
logical value. If |
infectious |
logical value. If |
Gabriel and Diggle (2009) propose the following approximately unbiased estimator for the STIK-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]:
K(u,v) = 1/|SxT| n/nv sum_{i=1,...,nv} sum_{j=1,...,nv; j > i} 1/wij 1/(lambda(x_i)lambda(x_j)) 1{uij <= u} 1{tj - ti <= v}
In this equation, lambda(xi) is the intensity at xi=(si,ti) and the xi are ordered so that ti < t(i+1), with ties due to round-off error broken by randomly unrounding if necessary. To deal with temporal edge-effects, for each v, nv denotes the number of events for which ti <= T1-v. 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.
If lambda
is missing in argument, STIKhat
computes an estimate of the space-time (homogeneous)
K-function:
K'(u,v) = |SxT|/(nv(n-1)) sum_{i=1,...,nv} sum_{j=1,...,nv; j>i} 1/wij 1{uij <= u} 1{tj - ti <= v}
If parameter infectious = FALSE
, both future and past
events are considered and the estimator is:
K^*(u,v) = 1/|SxT| sum_{i=1,...,n} sum_{j=1,...,n; j \neq j} 1/wij 1/(lambda(xi)lambda(xj)) 1{uij <= u} 1{|tj - ti| <= v}
where 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.
A list containing:
Khat |
ndist x ntimes matrix containing values of K(u,v). |
Ktheo |
ndist x ntimes matrix containing theoretical values for a Poisson process; pi u^2 v for K and 2 pi u^2 v) for K^*. |
dist, times, infectious |
parameters passed in argument. |
Edith Gabriel <edith.gabriel@univ-avignon.fr>
Gabriel E., Diggle P. (2009) Second-order analysis of inhomogeneous spatio-temporal point process data. Statistica Neerlandica, 63, 43–51.
Baddeley A., Moller J. and Waagepetersen R. (2000). Non- and semi-parametric estimation of interaction in inhomogeneous point patterns. Statistica Neerlandica, 54, 329–350.
Diggle P. , Chedwynd A., Haggkvist R. and Morris S. (1995). Second-order analysis of space-time clustering. Statistical Methods in Medical Research, 4, 124–136.
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 | ## 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 STIK function
u <- seq(0,10,by=1)
v <- seq(0,15,by=1)
stik <- STIKhat(xyt=FMD, s.region=northcumbria/1000,t.region=c(1,200),
lambda=mhat*mut/dim(FMD)[1], dist=u, times=v, infectious=TRUE)
# plotting the estimation
plotK(stik)
plotK(stik,persp=T,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.