How is variogramST dealing with distance and time?

535 Views Asked by At

I'm new in analysis in so I don't know if what I'm doing is right. I have a lot of spatio-temporal data and I would like to plot a spatio-temporal sample variogram.

My problem is that I don't really understand how variogramST (package: gstat) works. Is spacelag in km or what? This is what I've done by now:

var_st <- variogramST (datast~1, data=DF, tunits="days", tlags=seq(0, 93, by= 31), 
                       boundaries=seq(0, 100, by=25), na.omit=T, assumeRegular=F)

My second question is:

Is it plotting variogram at exact distance 25, 50, 75, 100? For example, if two cities have a distance e.g 12 is variogramST considering it? Or is it just considering pairs of observation with exact distance 25, 50, 75, 100? Moreover, I have monthly data. I read that in this case the best option is to choose tunits="days" and I choose tlags=seq(0, 93, by= 31), is it right? I don't know how to deal with it otherwise.

Thank you very much for all of those people who are going to answer me!

1

There are 1 best solutions below

0
On
  1. The spatial distance unit depends on the coordinate reference system of your input data, see sp::spDistsN1 for details.

  2. The empirical variogram relies on a binning - distance classes. Observations in space and time are grouped by their approximate spatial distance (e.g. 0 km to 25 km; 25 km to 50 km, ... according to cutoff, width and boundaries). In time, it also depends on the class of the object you provide to variogramST:

    • For a STFDF, the tlags are evaluated as ids of the time slot of the STFDF, in your case observations at the same time id, with 31, 62 and 93 ids difference - most likely not what you want, assuming every id in the time slot of DF refers to a new month, you need to use 0:3. The argument tunit has no effect here.
    • If the data object is an STIDF, temporal distances are also binned to separation ranges where tlags are used as the breaks between classes with the temporal unit tunit.

See the package spacetime for details on the representation of spatio-temporal data as STFDF, STSDF, and STIDF.

HTH