Learn R Programming

BiSeq (version 1.12.0)

smoothVariogram: Smoothes variogram

Description

Nonparametric smoothing with kernel regression estimators and adaptable bandwidth for variogram smoothing.

Usage

smoothVariogram(variogram, sill, bandwidth)

Arguments

variogram
A list or a matrix. Usually the output of makeVariogram.
sill
A numeric. The sill (upper bound) of the variogram. See Details.
bandwidth
A numeric vector of same length as the variogram (number of rows). Default: seq(10,1000, length.out=nrow(variogram)). See Details.

Value

v values.

Details

It is necessary to smooth the variogram. Especially for greater h the variogram tends to oscillate strongly. This is the reason why the default bandwidth increases with increasing h. Nevertheless, the smoothed variogram may further increase or decrease after a horizontal part (sill). This is mostly due to the small number of observations for high distances. To wipe out this bias it is useful to set the smoothed variogram to a fixed value above a certain h, usually the mean value of the horizontal part. If a smoothed value $v.sm$ is greater than sill for distance $h_{range}$, this $v.sm$ and all other smoothed values with $h > h_{range}$ are set to sill. Internally, the function lokerns from package lokerns is used for smoothing.

See Also

makeVariogram, lokerns

Examples

Run this code
data(vario)

# Find out the sill (this is more obvious for larger data sets):
plot(vario$variogram$v)

vario.sm <- smoothVariogram(vario, sill = 0.9)

plot(vario$variogram$v)
lines(vario.sm$variogram[,c("h", "v.sm")],
col = "red")

Run the code above in your browser using DataLab