[R-sig-Geo] Package for automatic interpolation
Paul Hiemstra
p.hiemstra at geo.uu.nl
Wed Mar 12 13:14:18 CET 2008
Hi Thomas,
The automatic fitting procedure checks a range of possible variogram
models, including Spherical, Exponential, Gaussian and Matern models.
Each of these models could lead to a singular model fit. The fitting
function in gstat (fit.variogram) says the following on singular model fits:
"""On singular model fits: If your variogram turns out to be a flat,
horizontal or sloping line, then fitting a three parameter model such as
the exponential or spherical with nugget is a bit heavy: there's an
infinite number of possible combinations of sill and range (both very
large) to fit to a sloping line. In this case, the returned, singular
model may still be useful: just try and plot it. Gstat converges when
the parameter values stabilize, and this may not be the case. Another
case of singular model fits happens when a model that reaches the sill
(such as the spherical) is fit with a nugget, and the range parameter
starts, or converges to a value smaller than the distance of the second
sample variogram estimate. In this case, again, an infinite number of
possibilities occur essentially for fitting a line through a single
(first sample variogram) point. In both cases, fixing one or more of the
variogram model parameters may help you out. """'
regards,
Paul
Thomas Adams schreef:
> Paul,
>
> This is outstanding; thank you very much! BTW, I noticed that when I
> run your example that I get:
>
> Warning: singular model in variogram fit
>
> …actually, 2 such warnings with the OK example, and 1 with the UK
> example. Are you seeing these too? Otherwise, the results look fine…
>
> Thanks again for your contribution!
>
> Regards,
> Tom
>
>
> Paul Hiemstra wrote:
>> Dear r-sig-geo,
>>
>> In the course of my PhD I have written a R package that performs
>> automatic interpolation (kriging) and might be interesting for other
>> people. I work on real-time automatic interpolation of radioactivity
>> levels. It depends heavily on the gstat pacakge written by Edzer
>> (Pebesma, he is my supervisor). If people are interested in this
>> package, it can be downloaded from
>> http://intamap.geo.uu.nl/~paul/Downloads.html. If you have any
>> comments, complaints or suggestions please do not hesitate to e-mail me.
>>
>> Some sample code:
>> library(automap)
>> data(meuse)
>> coordinates(meuse) = ~x+y
>> data(meuse.grid)
>> gridded(meuse.grid) = ~x+y
>> kr.ok = autoKrige(log(zinc)~1, meuse, meuse.grid)
>> plot(kr.ok)
>> kr.uk = autoKrige(log(zinc)~sqrt(dist), meuse, meuse.grid)
>> plot(kr.uk)
>>
>> cheers,
>> Paul
>>
>>
>
>
--
Drs. Paul Hiemstra
Department of Physical Geography
Faculty of Geosciences
University of Utrecht
Heidelberglaan 2
P.O. Box 80.115
3508 TC Utrecht
Phone: +31302535773
Fax: +31302531145
http://intamap.geo.uu.nl/~paul
More information about the R-sig-Geo
mailing list