sm.variogram {sm} | R Documentation |
This function constructs an empirical variogram, using the robust form of construction based on square-root absolute value differences of the data. Nonparametric regression is used to assess whether the mean value of the empirical variogram changes with distance. A hypothesis test and a graphical reference band are both available, under the assumption that the errors in the data are approximately normally distributed.
sm.variogram(x, y, h, ...)
x |
a vector or two-column matrix of spatial location values. |
y |
a vector of responses observed at the spatial locations. |
h |
a smoothing parameter to be used on the distance scale. A normal kernel
function is used and |
... |
other optional parameters are passed to the |
The reference below describes the statistical methods used in the function.
The display
argument has a special meaning for
this function. Its default value is "binned"
, which plots the
binned version of the empirical variogram. As usual, the value "none"
will suppress the graphical display. Any other value will lead to a plot
of the individual differences between all observations. This will lead
to a very large number of plotted points, unless the dataset is small.
Setting se = TRUE
produces standard errors for the binned values of the
empirical variogram. They are constructed to account for the correlation which
arises from the differencing involved in the variogram. However, the calculations
assume spatial independence and they therefore simply give an indication of the
variability under this assumption.
a list containing the raw (sqrtdiff
, distance
) and binned
(sqrtdiff.mean
, distance.mean
) differences and distances,
the frequencies of the bins (weights
),
the values of the estimate (estimate
) at the evaluation points
(eval.points
) the value of the smoothing parameter (h
) used,
an indicator (ibin
) of the bin in which the distance between
each pair of observations was placed and the indices (ipair
) of
the original observations used to construct each pair.
If a test of spatial independence has been performed, the p-value (p
)
is returned. If se
was set to TRUE
then the standard errors
(se
) of the binned values, under the assumption of spatial independence,
are returned. If a reference band has been requested, the standard error
(se.band
) of the difference between the smooth estimate and the mean
of all the data points is also returned.
a plot on the current graphical device is produced, unless the option
display="none"
is set.
Diblasi, A. and Bowman, A.W. (2001). On the use of the variogram for checking independence in a Gaussian spatial process. Biometrics, 57, 211-218.
provide.data(coalash) Position <- cbind(East, North) sm.options(df = 6) par(mfrow=c(2,2)) sm.variogram(Position, Percent, band = FALSE) sm.variogram(Position, Percent) sm.variogram(East, Percent) sm.variogram(North, Percent) par(mfrow=c(1,1))