contour map of spatial-temporal K function

前端 未结 3 1968
长发绾君心
长发绾君心 2021-01-29 12:54

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

3条回答
  •  耶瑟儿~
    2021-01-29 13:34

    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)
    

提交回复
热议问题