Skip to content
Prev 8181 / 29559 Next

negative range from fit.variogram through autofitVariogram

Hi Mark,

Thanks for the reproducible example. The problem is that when I look at 
the sample variogram, the semivariance values start high and end low. 
This is best illustrated by:

plot(variogram(theta_percent~1, sparse))

You see that there are outliers in the data that cause high 
semi-variance at a short distance. I would say that is 'strange' ;). You 
can try and identify which point causes this by:

plot(variogram(theta_percent~1, sparse, cloud = TRUE), identify = TRUE)
# Click on the plot to identify the point pairs

There is not really one value I think that causes this. It might be also 
attributable to the fact that your dataset is somewhat sparse in the 
distance range from 20-40 m.

As a quick fix you can restrict the model selection to "Sph", this 
works. And I would not be enthusiastic about using Ste. This is because 
the main difference between different kappa values if the behavior at 
short distances, but you don't have a lot of data on the short distance 
to fit this value on in a meaningful way.

At this stage I don't see a (relatively quick) fix that could solve this 
problem in an automatic way and on a more fundamental level. Do you have 
any suggestions? From an implementation point of view I can let automap 
discard any model that has negative values in it, this would ensure that 
the user gets at least the Sph model back.

cheers,
Paul
Mark Connolly wrote: