Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/georob_variogram.R
The function sample.variogram
computes the
sample (empirical) variogram of a spatial variable by the method-of-moment
and three robust estimators. Both omnidirectional and direction-dependent
variograms can be computed, the latter for observation locations in a
three-dimensional domain. There are summary
and plot
methods for summarizing and displaying sample variograms.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | sample.variogram(object, ...)
## Default S3 method:
sample.variogram(object, locations, lag.dist.def,
xy.angle.def = c(0, 180), xz.angle.def = c(0, 180), max.lag = Inf,
estimator = c("qn", "mad", "matheron", "ch"), mean.angle = TRUE, ...)
## S3 method for class 'formula'
sample.variogram(object, data, subset, na.action,
locations, lag.dist.def, xy.angle.def = c(0, 180),
xz.angle.def = c(0, 180), max.lag = Inf,
estimator = c("qn", "mad", "matheron", "ch"), mean.angle = TRUE, ...)
## S3 method for class 'georob'
sample.variogram(object, lag.dist.def,
xy.angle.def = c(0, 180), xz.angle.def = c(0, 180), max.lag = Inf,
estimator = c("qn", "mad", "matheron", "ch"), mean.angle = TRUE, ...)
## S3 method for class 'sample.variogram'
summary(object, ...)
## S3 method for class 'sample.variogram'
plot(x, type = "p", add = FALSE,
xlim = c(0, max(x[["lag.dist"]])),
ylim = c(0, 1.1 * max(x[["gamma"]])), col, pch, lty, cex = 0.8,
xlab = "lag distance", ylab = "semivariance",
annotate.npairs = FALSE, npairs.pos = 3, npairs.cex = 0.7,
legend = nlevels(x[["xy.angle"]]) > 1 || nlevels(x[["xz.angle"]]) > 1,
legend.pos = "topleft", ...)
|
object |
a numeric vector with the values of the response for which
the sample variogram should be computed
( |
locations |
a numeric matrix with the coordinates of the locations
where the response was observed ( |
data |
an optional data frame, list or environment (or another
object coercible by |
subset |
an optional vector specifying a subset of observations to be used for estimating the variogram. |
na.action |
a function which indicates what should happen when the
data contain |
lag.dist.def |
a numeric scalar defining a constant bin
width for grouping the lag distances or a numeric vector with the bounds
of a set of contiguous bins (upper bounds of bins except for the first
element of |
xy.angle.def |
an numeric vector defining angular classes
in the horizontal plane for computing directional variograms.
|
xz.angle.def |
an numeric vector defining angular classes
in the x-z-plane for computing directional variograms.
|
max.lag |
positive numeric defining the largest lag distance for which semi variances should be computed (default no restriction). |
estimator |
character keyword defining the estimator for computing the sample variogram. Possible values are:
|
mean.angle |
logical controlling whether the mean lag vector (per
combination of lag distance and angular class) is computed from the mean
angles of all the lag vectors falling into a given class ( |
x |
an object of class |
type, xlim, ylim, xlab, ylab |
see respective arguments of
|
add |
logical controlling whether a new plot should be
generated ( |
col |
the color of plotting symbols for distinguishing semi variances for angular classes in the x-y-plane. |
pch |
the type of plotting symbols for distinguishing semi variances for angular classes in the x-z-plane. |
lty |
the line type. |
cex |
character expansion factor for plotting symbols. |
annotate.npairs |
logical controlling whether the plotting symbols should be annotated by the number of data pairs per lag class. |
npairs.pos |
integer defining the position where text annotation
about number of pairs should be plotted, see
|
npairs.cex |
numeric defining the character expansion for text annotation about number of pairs. |
legend |
logical controlling whether a
|
legend.pos |
a character keyword defining where to place the
legend, see |
... |
additional arguments passed to
|
The angular classes in the x-y- and x-z-plane are
defined by vectors of ascending angles on the half circle. The ith
angular class is defined by the vector elements, say l and u,
with indices i and i+1. A lag vector belongs to the
ith angular class if its azimuth (or angle from zenith), say
φ, satisfies l < φ <= u.
If the first and the last element of xy.angle.def
or
xz.angle.def
are equal to 0
and 180
degrees,
respectively, then the first and the last angular class are
“joined”, i.e., if there are K angles, there will be only
K-2 angular classes and the first class is defined by the interval
( xy.angle.def[K-1]-180, xy.angle.def[2] ] and the last
class by ( xy.angle.def[K-2], xy.angle.def[K-1]].
An object of class sample.variogram
, which is a data frame
with the following components:
lag.dist | the mean lag distance of the lag class, |
xy.angle | the angular class in the x-y-plane, |
xz.angle | the angular class in the x-z-plane, |
gamma | the estimated semi-variance of the lag class, |
npairs | the number of data pairs in the lag class, |
lag.x | the x-component of the mean lag vector of the lag class, |
lag.x | the y-component of the mean lag vector of the lag class, |
lag.z | the z-component of the mean lag vector of the lag class. |
Andreas Papritz andreas.papritz@env.ethz.ch.
Cressie, N. and Hawkins, D. M. (1980) Robust Estimation of the Variogram: I. Mathematical Geology, 12, 115–125.
Dowd, P. A. (1984) The variogram and Kriging: Robust and resistant estimators. In Geostatistics for Natural Resources Characterization, Verly, G., David, M., Journel, A. and Marechal, A. (Eds.) Dordrecht: D. Reidel Publishing Company, Part I, 1, 91–106.
Genton, M. (1998) Highly Robust Variogram Estimation. Mathematical Geology, 30, 213–220.
georobIntro
for a description of the model and a brief summary of the algorithms;
georob
for (robust) fitting of spatial linear models;
georobObject
for a description of the class georob
;
profilelogLik
for computing profiles of Gaussian likelihoods;
plot.georob
for display of RE(ML) variogram estimates;
control.georob
for controlling the behaviour of georob
;
georobModelBuilding
for stepwise building models of class georob
;
cv.georob
for assessing the goodness of a fit by georob
;
georobMethods
for further methods for the class georob
;
predict.georob
for computing robust Kriging predictions;
lgnpp
for unbiased back-transformation of Kriging prediction
of log-transformed data;
georobSimulation
for simulating realizations of a Gaussian process
from model fitted by georob
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | data(wolfcamp)
## fitting an isotropic IRF(0) model
r.sv.iso <- sample.variogram(pressure~1, data = wolfcamp,
locations = ~x + y, lag.dist.def = seq(0, 200, by = 15))
## Not run:
plot(r.sv.iso, type = "l")
## End(Not run)
## fitting an anisotropic IRF(0) model
r.sv.aniso <- sample.variogram(pressure~1, data = wolfcamp,
locations = ~x + y, lag.dist.def = seq(0, 200, by = 15),
xy.angle.def = c(0., 22.5, 67.5, 112.5, 157.5, 180.))
## Not run:
plot(r.sv.aniso, type = "l", add = TRUE, col = 2:5)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.