binned variogram
, a variogram cloud
or a smoothed variogram
. Data
transformation (Box-Cox) is allowed. Trends fitted by ordinary least
squares can be removed. In this case variograms are computed using the
residuals.variog(geodata, coords=geodata$coords, data=geodata$data,
uvec = "default", trend = "cte", lambda = 1,
option = c("bin", "cloud", "smooth"),
estimator.type = c("classical", "modulus"),
nugget.tolerance = 0, max.dist = NULL, pairs.min = 2,
bin.cloud = FALSE, direction = "omnidirectional",
tolerance = pi/8, unit.angle = c("radians", "degrees"),
messages.screen = TRUE, ...)
coords
as described next. Typically an object of the class
"geodata"
- a geoR data-set.
If not provided the arguments
coords
must be provided instead.geodata$coords
, if provided.geodata$data
, if provided.option = "bin"
.
See DETAILS
below for more details on how to speficy the bins.trend.spatial
for further details.
Defaults to "cte"
."bin"
returns values of
binned variogram, "cloud"
returns the variogram cloud and
"smooth"
returns the kernel smoothed variogram.
Defaults to "bin"
."classical"
computes the classical method of
moments estimator. "modulus"
returns the variogram
estimator suggested by Hawkins and Cressie (see Cressie, 1993, pg 75).
Defaults to "classical"
.option = "bin"
,
bins with number of pairs smaller than this
value are ignored. Defaults to NULL
.TRUE
and
option = "bin"
the cloud values for each class are
included in the output. Defaults to FALSE
."degrees"
and "radians"
.ksmooth
, if
option = "smooth"
.class
variogram
which is a
list with the following components:u
.option = "bin"
.pairs.min
.option
argument.Estimators
The two estimators currently implemented are:
Defining the bins
The default
If the argument uvec
is not provided, the default option is
assumed and the bins are defined as follows:
max.dist
. If not provided is it set
to the maximum distance between a pair of points.u = seq(0,
max.dist, l = 13)
.u[1] = u[2]/4
.variations on the default The default definition of the bins can be different in some cases.
nugget.tolerance
is provided the
separation distance between all pairs
in the interval$[0, nugget.tolerance]$are considered to zero.
The first element is now set to zerou[1] = 0
.
The remaining bins follows the default.uvec
the
default sequence size 13 is replaces by this number:u = seq(0,
max.dist, l = uvec)
uvec
,
its elements are taken central points of the bins, this vectors
replaces the default sequencevariog4
for more on computation of
directional variograms,
variog.model.env
and variog.mc.env
for
variogram envelopes,
variofit
for variogram based
parameter estimation and
plot.variogram
for graphical output.# Loading data:
if(is.R()) data(s100)
#
# computing variograms:
#
# binned variogram
vario.b <- variog(s100, max.dist=1)
# variogram cloud
vario.c <- variog(s100, max.dist=1, op="cloud")
#binned variogram and stores the cloud
vario.bc <- variog(s100, max.dist=1, bin.cloud=TRUE)
# smoothed variogram
vario.s <- variog(s100, max.dist=1, op="sm", band=0.2)
#
#
# plotting the variograms:
par(mfrow=c(2,2))
plot(vario.b, main="binned variogram")
plot(vario.c, main="variogram cloud")
plot(vario.bc, bin.cloud=TRUE, main="clouds for binned variogram")
plot(vario.s, main="smoothed variogram")
# computing a directional variogram
vario.0 <- variog(s100, max.dist=1, dir=0, tol=pi/8)
plot(vario.b, type="l", lty=2)
lines(vario.0)
legend(0, 1.2, legend=c("omnidirectional", expression(0 * degree)), lty=c(2,1))
Run the code above in your browser using DataLab