0

I am new to using gstat and variograms and hoping someone can help explain some details to me, that don't appear to be in the documentation.

I have used the default data and an example from one of the help pages to fit a spherical variogram https://gisgeography.com/semi-variogram-nugget-range-sill/ and many other website stat the following definitions:

  • SILL: The value at which the model first flattens out.
  • RANGE: The distance at which the model first flattens out.
  • NUGGET: The value at which the semi-variogram (almost) intercepts the y-value.

Which all makes sense. In the example data the fitted variogram gives this data.frame:

v.fit
#>   model      psill    range
#> 1   Nug 0.08234213    0.000
#> 2   Sph 0.38866509 1098.571

my interpretation of this would be that the nugget is 0.082, sill is 0.388 and range 1098.6 but in the plot below while the nugget and range line up the sill appears to be closer to 0.45. Can anyone explain these numbers?

library(gstat)
library(sp)
library(lattice)

data(meuse)
coordinates(meuse) = ~x+y
v = variogram(log(zinc)~x+y, meuse)
v.fit = fit.variogram(v, vgm(1, "Sph", 700, 1))
v.fit
#>   model      psill    range
#> 1   Nug 0.08234213    0.000
#> 2   Sph 0.38866509 1098.571

testplot<-  plot(v, v.fit,
          panel = function(x, ...) {
            panel = vgm.panel.xyplot(x, ...);
            panel.abline(h = v.fit$psill[1:2], v = v.fit$range[2])})
print(testplot)

Created on 2019-10-03 by the reprex package (v0.3.0)

Sarah
  • 3,022
  • 1
  • 19
  • 40

1 Answers1

0

Okay, I just realised that the two psill values add up to the top value. This may have been obvious to others but I will answer here instead of deleting in case other people are confused like me in the future.

    plot(thisvgm, fitvgm2, main = paste0(Reduce(paste, deparse(FORMULAS[[MOD]] )), " range = 15"), ylim = c(0,1500),
         panel = function(x, ...) {
           panel = vgm.panel.xyplot(x, ...);
           panel.abline(h = c(fitvgm2$psill[1],sum(fitvgm2$psill)), v = fitvgm2$range[2])})
Sarah
  • 3,022
  • 1
  • 19
  • 40
  • 1
    That's the correct explanation; note that "p" in "psill" stands for "partial". – Ben Oct 04 '19 at 07:07