Learn R Programming

npsp (version 0.3-6)

fitsvar.sb.iso: Fit an isotropic Shapiro-Botha variogram model

Description

Fits a `nonparametric' isotropic Shapiro-Botha variogram model by WLS through quadratic programming. Following Gorsich and Genton (2004), the nodes are selected as the scaled roots of Bessel functions (see disc.sb).

Usage

fitsvar.sb.iso(esv, dk = ncol(esv$data$x), nx = NULL,
    rmax = esv$grid$max, min.contrib = 10,
    method = c("cressie", "equal", "npairs", "linear"),
    iter = 10, tol = sqrt(.Machine$double.eps))

Arguments

esv
pilot semivariogram estimate, a np.svar-class (or svar.bin) object. Typically an output of the funct
dk
dimension of the kappa function (dk == 0 corresponds to a model valid in any dimension; if dk > 0, it should be greater than or equal to the dimension of the spatial process ncol(esv$data$x)).
nx
number of discretization nodes. Defaults to min(nesv - 1, 50), where nesv is the number of semivariogram estimates.
rmax
maximum lag considered in the discretization (range of the fitted variogram on output).
min.contrib
minimum number of (equivalent) contributing pairs (pilot estimates with a lower number are ignored, with a warning).
method
string indicating the WLS fitting method to be used (e.g. method = "cressie"). See "Details" below.
iter
maximum number of interations of the WLS algorithm (used only if method == "cressie").
tol
absolute convergence tolerance (used only if method == "cressie").

Value

  • Returns the fitted variogram model, an object of class fitsvar with an additional component fit containing:
  • uvector of lags/distances.
  • svvector of pilot semivariogram estimates.
  • fitted.svvector of fitted semivariances.
  • wlsvalue of the WLS objective function.
  • methodstring indicating the WLS fitting method used.
  • iternumber of WLS iterations (if method == "cressie").

Details

The fit is done using a (possibly iterated) weighted least squares criterion, minimizing: $$WLS(\theta) = \sum_i w_i[(\hat{\gamma}(h_i)) - \gamma(\theta; h_i)]^2.$$ The different options for the argument method define the WLS algorithm used: [object Object],[object Object],[object Object],[object Object] Function solve.QP of quadprog package is used to solve the quadratic programming problem. If nx and/or dim(esv) are large, this function may fail with error message "matrix D in quadratic function is not positive definite!".

References

Ball, J.S. (2000) Automatic computation of zeros of Bessel functions and other special functions. SIAM Journal on Scientific Computing, 21, 1458-1464. Cressie, N. (1985) Fitting variogram models by weighted least squares. Mathematical Geology, 17, 563-586. Cressie, N. (1993) Statistics for Spatial Data. New York. Wiley. Fernandez Casal R., Gonzalez Manteiga W. and Febrero Bande M. (2003) Flexible Spatio-Temporal Stationary Variogram Models, Statistics and Computing, 13, 127-136. Gorsich, D.J. and Genton, M.G. (2004) On the discretization of nonparametric covariogram estimators. Statistics and Computing, 14, 99-108. Shapiro, A. and Botha, J.D. (1991) Variogram fitting with a general class of conditionally non-negative definite functions. Computational Statistics and Data Analysis, 11, 87-96.

See Also

svarmod.sb.iso, disc.sb, plot.fitsvar.