STIKhat {stpp} | R Documentation |
Estimation of the Space-Time Inhomogeneous K-function
Description
Compute an estimate of the Space-Time Inhomogeneous K-function.
Usage
STIKhat(xyt, s.region, t.region, dist, times, lambda,
correction="isotropic", infectious=FALSE)
Arguments
xyt |
Coordinates and times |
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 |
times |
Vector of times |
lambda |
Vector of values of the space-time intensity function evaluated at the points |
correction |
A character vector specifying the edge correction(s) to be applied among |
infectious |
Logical value. If |
Details
Gabriel (2014) proposes the following unbiased estimator for the STIK-function, based on data giving the locations of events on a spatio-temporal region
, where
is an arbitrary polygon and
is a time interval:
where is the intensity at
and
is an edge correction factor to deal with spatial-temporal edge effects. The edge correction methods implemented are:
isotropic
: , where the temporal edge correction factor
if both ends of the interval of length
centred at
lie within
and
otherwise and
is the proportion of the circumference of a circle centred at the location
with radius
lying in
(also called Ripley's edge correction factor).
border
: , where
denotes the distance between
and the boundary of
and
the distance between
and the boundary of
.
modified.border
: , where
and
are the eroded spatial and temporal region respectively, obtained by trimming off a margin of width
and
from the border of the original region.
translate
: , where
and
are the translated spatial and temporal regions.
none
: No edge correction is performed and .
If parameter infectious = TRUE
, ony future events are considered and the estimator is, using an isotropic edge correction factor (Gabriel and Diggle, 2009):
In this equation, the points are ordered so that
, with ties due to round-off error broken by randomly unrounding if necessary. To deal with temporal edge-effects, for each
,
denotes the number of events for which
, with
. To deal with spatial edge-effects, we use Ripley's method.
If lambda
is missing in argument, STIKhat
computes an estimate of the space-time (homogeneous)
K-function:
Value
A list containing:
Khat |
|
Ktheo |
|
dist , times , infectious |
Parameters passed in argument. |
correction |
The name(s) of the edge correction method(s) passed in argument. |
Author(s)
Edith Gabriel <edith.gabriel@inrae.fr>
References
Baddeley A., Moller J. and Waagepetersen R. (2000). Non- and semi-parametric estimation of interaction in inhomogeneous point patterns. Statistica Neerlandica, 54, 329–350.
Baddeley, A., Rubak, E., Turner, R., (2015). Spatial Point Patterns: Methodology and Applications with R. CRC Press, Boca Raton.
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.
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.
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(2), 411–431.
Examples
# 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 STIK function
u <- seq(0,10,by=1)
v <- seq(0,15,by=1)
stik1 <- 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(stik1)
plotK(stik1,type="persp",theta=-65,phi=35)
# Second example
xyt=rpp(lambda=200)
stik2=STIKhat(xyt$xyt,dist=seq(0,0.16,by=0.02),
times=seq(0,0.16,by=0.02),correction=c("border","translate"))
plotK(stik2,type="contour",legend=TRUE,which="translate")