Description Usage Arguments Value Note Author(s) References See Also Examples
View source: R/fit.variogram.gls.R
Fits variogram parameters (nugget, sill, range) to variogram cloud, using GLS (generalized least squares) fitting. Only for direct variograms.
1 2 3 |
formula |
formula defining the response vector and (possible)
regressors; in case of absence of regressors, use e.g. |
data |
object of class Spatial |
model |
variogram model to be fitted, output of |
maxiter |
maximum number of iterations |
eps |
convergence criterium |
trace |
logical; if TRUE, prints parameter trace |
ignoreInitial |
logical;
if FALSE, initial parameter are taken from model;
if TRUE, initial values of model are
ignored and taken from variogram cloud:
nugget: |
cutoff |
maximum distance up to which point pairs are taken into consideration |
plot |
logical; if TRUE, a plot is returned with variogram cloud and fitted model; else, the fitted model is returned. |
an object of class "variogramModel"; see fit.variogram; if
plot
is TRUE, a plot is returned instead.
Inspired by the code of Mihael Drinovac, which was again inspired by code from Ernst Glatzer, author of package vardiag.
Edzer Pebesma
Mueller, W.G., 1999: Least-squares fitting from the variogram cloud. Statistics \& Probability Letters, 43, 93-98.
Mueller, W.G., 2007: Collecting Spatial Data. Springer, Heidelberg.
fit.variogram,
1 2 3 4 5 6 7 | library(sp)
data(meuse)
coordinates(meuse) = ~x+y
## Not run:
fit.variogram.gls(log(zinc)~1, meuse[1:40,], vgm(1, "Sph", 900,1))
## End(Not run)
|
[1] 0.0000000 0.5433039 721.3554679
[1] 4.846680e-05 5.004239e-01 1.022720e+03
[1] 4.846680e-05 2.912359e-01 1.197143e+03
[1] 4.846680e-05 3.261386e-01 1.281040e+03
[1] 4.846680e-05 3.462591e-01 1.361355e+03
[1] 4.846680e-05 3.657127e-01 1.361355e+03
[1] 4.846680e-05 3.656921e-01 1.361355e+03
model psill range
1 Nug 0.0000484668 0.000
2 Sph 0.3656921273 1361.355
Warning message:
In fit.variogram.gls(log(zinc) ~ 1, meuse[1:40, ], vgm(1, "Sph", :
range parameter at search space boundary
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.