[R-sig-Geo] default value for cutoff in gstat variogram()

Edzer J Pebesma e.pebesma at geo.uu.nl
Mon Jun 5 21:29:58 CEST 2006


Patrick Giraudoux wrote:

> I wonder what is the default value for the argument 'cutoff' when not 
> specified in the variogram.formula function of gstat. Computing 
> variogram envelops within gstat, I am comparing the results obtained 
> with variog in geoR and variogram in gstat, and it took me a while 
> before understanding that the cutoff default value is not the maximum 
> distance.
>
> Can Edzer tell us about it?

Yes, of course (while I'm moving this from r-help to r-sig-geo):

the default value is computed in the c code. Without checking
(meaning: from >10 years memory) I do recall that gstat uses
one third of the diagional of the rectangular (or block for 3D)
that spans the data locations.

Why? In time series you compute ACF's up to one half
of the length of the series; after this things start to oscillate
because you lack independent replication at large distance;
look at what is meant by ergodicity for further reading.
Variograms are basically flipped & unscaled acf's for higher
dimensions.

Some books (Journel & Huijbregts?) gave suggestions
that half the max. distance in the data set is a good guideline,
back in 1978. I used  one third of the diagonal because
I thought finding the maximum distance between any
too point pairs may be expensive to find for large data
sets. The parameter "one third" can be overridden by
those who don't like it.

Please keep us updated about your milage comparing
gstat and geoR; I once spent an afternoon on this, trying
to reproduce sample variogram across the packages and
found this hard (but not impossible). I had the feeling
it had to do with using < or <= to decide whether a
point pairs falls in a distance interval or not, but didn't 100%
assure myself.
--
Edzer




More information about the R-sig-Geo mailing list