I have latitude and longitude point data over time. I would like to plot (in R or Matlab) a contour map of spatial-temporal K function (much like the one below), but have no ide
Here's how to compute space-time K-functions using the stkhat
function in the splancs
package. I make some random data on a space-time cube, then compute the soace-time K function estimate for a spatial range up to 0.3 distance units and 0.3 time units.
> require(splancs)
> xyt=matrix(runif(3000),ncol=3)
> poly=bboxx(spoints(c(0,1,0,1)))
> tlim=c(0,1)
> s=seq(0,.3,len=51)[-1]
> t=s
> stk = stkhat(xyt[,1:2], xyt[,3], poly, tlim, s,t)
> image(str$kst)
> require(lattice)
> image(x=stk$s, y=stk$t,z = stk$kst)