variogramGuess: Guess the parameters of a spatial covariance function

View source: R/vgmICP.R

variogramGuessR Documentation

Guess the parameters of a spatial covariance function

Description

Guess the parameters of the spatial covariance function of a random, regionalized variable. A guess of such parameters is required to start the fitting functions of many geostatistical packages such as gstat, geoR, and georob.

Usage

variogramGuess(
  z,
  coords,
  lags,
  cutoff = 0.5,
  method = "a",
  min.npairs = 30,
  model = "matern",
  nu = 0.5,
  estimator = "qn",
  plotit = FALSE
)

vgmICP(
  z,
  coords,
  lags,
  cutoff = 0.5,
  method = "a",
  min.npairs = 30,
  model = "matern",
  nu = 0.5,
  estimator = "qn",
  plotit = FALSE
)

Arguments

z

Numeric vector with the values of the regionalized variable for which the values for the spatial covariance parameters should be guessed.

coords

Data frame or matrix with the projected x- and y-coordinates.

lags

Numeric scalar defining the width of the variogram bins or a numeric vector with the lower and upper bounds of the variogram bins. If missing, the variogram bins are computed using variogramBins(). See ‘Details’ for more information.

cutoff

Numeric value defining the fraction of the diagonal of the rectangle that spans the data (bounding box) that should be used to set the maximum distance up to which variogram bins should be computed. Defaults to cutoff = 0.5, i.e. half the diagonal of the bounding box.

method

Character keyword defining the method used for guessing the spatial covariance parameters of the regionalized variable. Defaults to method = "a". See ‘Details’ for more information.

min.npairs

Positive integer defining the minimum number of point-pairs required so that a variogram bin is used to guessing the spatial covariance parameters of the of the regionalized variable. Defaults to min.npairs = 30.

model

Character keyword defining the spatial covariance function that will be fitted to the data of the regionalized variable. Currently, most of the basic spatial covariance function are accepted. See geoR::cov.spatial() for more information. Defaults to model = "matern".

nu

Numerical value for the additional smoothness parameter ν of the spatial covariance function of the regionalized variable. See RandomFields::RMmodel() and argument kappa of geoR::cov.spatial() for more information.

estimator

Character keyword defining the estimator for computing the sample (experimental) variogram of the regionalized variable, with options "qn" (default), "mad", "matheron", and "ch". See georob::sample.variogram() for more details.

plotit

Should the guessed spatial covariance parameters be plotted along with the sample (experimental) variogram of the regionalized variable? Defaults to plotit = FALSE.

Details

There are five methods two guess the covariance parameters. Two of them, "a" and "c", rely on a sample variogram with exponentially growing variogram bins, while the other three, "b", "d", and "e", use equal-width variogram bins (see variogramBins()). All of them are heuristic.

Method "a" was developed in-house and is the most elaborated of them, specially for guessing the nugget variance.

Method "b" was proposed by doi: 10.1016/0098-3004(95)00095-XJian et al. (1996) and is implemented in SAS/STAT(R) 9.22.

Method "c" is implemented in the automap-package and was developed by doi: 10.1016/j.cageo.2008.10.011Hiemstra et al. (2009).

Method "d" was developed by doi: 10.1007/s11004-012-9434-1Desassis & Renard (2012).

Method "e" was proposed by Larrondo et al. (2003) http://www.ccgalberta.com/ccgresources/report05/2003-122-varfit.pdf and is implemented in the VARFIT module of GSLIB http://www.gslib.com/.

Value

A vector of numerical values, the guesses for the spatial covariance parameters of the regionalized variable:

  • nugget

  • partial sill

  • range

Dependencies

The georob package, provider of functions for the robust geostatistical analysis of spatial data in R, is required for variogramGuess() to work. The old versions of the georob package are available on the CRAN archive at https://cran.r-project.org/src/contrib/Archive/georob/.

Author(s)

Alessandro Samuel-Rosa alessandrosamuelrosa@gmail.com

References

Desassis, N. & Renard, D. Automatic variogram modelling by iterative least squares: univariate and multivariate cases. Mathematical Geosciences. Springer Science + Business Media, v. 45, p. 453-470, 2012.

Hiemstra, P. H.; Pebesma, E. J.; Twenhöfel, C. J. & Heuvelink, G. B. Real-time automatic interpolation of ambient gamma dose rates from the Dutch radioactivity monitoring network. Computers & Geosciences. Elsevier BV, v. 35, p. 1711-1721, 2009.

Jian, X.; Olea, R. A. & Yu, Y.-S. Semivariogram modelling by weighted least squares. Computers & Geosciences. Elsevier BV, v. 22, p. 387-397, 1996.

Larrondo, P. F.; Neufeld, C. T. & Deutsch, C. V. VARFIT: a program for semi-automatic variogram modelling. Edmonton: Department of Civil and Environmental Engineering, University of Alberta, p. 17, 2003.

See Also

variogramBins()

Examples

if (all(c(require(sp), require(georob)))) {
  data(meuse, package = "sp")
  icp <- variogramGuess(z = log(meuse$copper), coords = meuse[, 1:2])
}

samuel-rosa/pedometrics documentation built on June 21, 2022, 11:32 p.m.