sm.variogram {sm}R Documentation

A test of spatial independence based on smoothing an empirical variogram.

Description

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.

Usage

sm.variogram(x, y, h, ...)

Arguments

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 h is its standard deviation. However, if this argument is omitted h will be selected by an approximate degrees of freedom criterion, controlled by the df parameter. See sm.options for details.
... other optional parameters are passed to the sm.options function, through a mechanism which limits their effect only to this call of the function; those relevant for this function are add, eval.points, ngrid, se, xlab, ylab, xlim, ylim, lty; see the documentation of sm.options for their description. See the details section below for a discussion of the display and se parameters in this setting.

Details

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.

Value

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.

Side Effects

a plot on the current graphical device is produced, unless the option display="none" is set.

References

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.

See Also

sm.regression, sm.options

Examples

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))

[Package sm version 2.2-2 Index]