Skip to contents

Weights: method 1 \(N_k\), 6 unweighted, 7 \(N_k/h_k^2\); sills solved exactly for given ranges, log ranges by Nelder-Mead. Method 2 minimises Cressie's criterion \(\sum N_k(\gamma_k - \gamma(h_k))^2/\gamma(h_k)^2\) jointly (gstat instead iterates reweighted fits) (Cressie 1985).

Usage

FitVariogram(sample, model, method = 7L, fit_ranges = TRUE)

Arguments

sample

Output of SampleVariogram.

model

Initial component(s).

method

1, 2, 6 or 7.

fit_ranges

Fit the ranges.

Value

List with fitted model and sse.

References

Cressie, N. (1985). Fitting variogram models by weighted least squares. Mathematical Geology 17, 563-586.

Examples

sv <- list(np = c(10, 12, 9), dist = c(0.5, 1, 1.5), gamma = c(0.4, 0.63, 0.78))
FitVariogram(sv, list(model = "Exp", psill = 1, range = 1), fit_ranges = FALSE)$model[[1]]$psill
#> [1] 1.007195