Skip to content
Prev 11212 / 29559 Next

sample semivariogram use, retrieving anisotropic parameters, subsampling

Hi Annette,

If you are interested in automating variogram fitting, take a look at
the autofitVariogram function from the automap package. A small example:

library(automap)
data(meuse)
coordinates(meuse) =~ x+y
variogram = autofitVariogram(zinc~1,meuse)
plot(variogram)

variogram = autofitVariogram(zinc ~ soil + ffreq + dist, meuse)
plot(variogram)

The result of autofitVariogram is both the sample variogram and the
fitted nugget. Extracting elements such as the nugget is quite simple:

nug = variogram$var_model$psill[1]
sill = variogram$var_model$psill[2] + nug
range = variogram$var_model$range[2]

hope this helps,
Paul
On 03/16/2011 03:27 PM, Annette H Elmore wrote: