View source: R/fit_variogram.R
fit_variogram | R Documentation |
This function is a wrapper around autofitVariogram
.
The function runs a simple and ordinary krigging. For example, if the r
esponse variable is R
then the formula that will be supplied in the data is R~1
.
Five experimental variogram models are tested automatically on selected response variable. The function supports spatial data in simple features (sf), SpatialPointsDataFrame(sp) or data.frame. The later format requires X, and Y as variables in the data.frame.
fit_variogram(data, response, coords = c("X", "Y"))
data |
An object of |
response |
A response variable within quotes e.g. "response" |
coords |
(vector) A pair of coordinate when input data is data.frame and not "sf" or "sp" object. The X (Longitude) and Y (Latitude) should be column variables in the input data set |
Five different types of geostatistical models are tested
through autofitVariogram
, they are:Spherical (Sph),
Gaussian (Gau), Exponential (Exp), Matern family (Mat), and
M.Stein's parameterization on Matern model.
For more information please refer to original autofitVariogram
function from automap package.
An object of a type autofitVariogram is returned. This object contains the experimental variogram,the fitted variogram model and the sums of squares (sserr) between the sample variogram and the fitted variogram model.
Hiemstra, P.H., Pebesma, E.J., Twenhofel, C.J.W. and G.B.M. Heuvelink, 2008. Real-time automatic interpolation of ambient gamma dose rates from the Dutch Radioactivity Monitoring Network. Computers & Geosciences.DOI:
Pebesma, E.J., 2004. Multivariable geostatistics in S: the gstat package. Computers & Geosciences, 30: 683-691. Benedikt Gräler, Edzer Pebesma and Gerard Heuvelink, 2016. Spatio-Temporal Interpolation using gstat. The R Journal 8(1), 204-218
autofitVariogram
, fit_multiple_variogram
,
plot_variogram
## Not run:
data("landcover")
vfit<- fit_variogram(data = landcover,response = "MPC1",coords = NULL)
vfit
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.