Variogram.default
Calculate Semi-variogram
Description
This method function calculates the semi-variogram for an arbitrary vector object
, according to the distances in distance
. For each pair of elements x,y in object
, the corresponding semi-variogram is (x-y)^2/2. The semi-variogram is useful for identifying and modeling spatial correlation structures in observations with constant expectation and constant variance.
Usage
## Default S3 method: Variogram(object, distance, ...)
Arguments
object | a numeric vector with the values to be used for calculating the semi-variogram, usually a residual vector from a fitted model. |
distance | a numeric vector with the pairwise distances corresponding to the elements of |
... | some methods for this generic require additional arguments. None are used in this method. |
Value
a data frame with columns variog
and dist
representing, respectively, the semi-variogram values and the corresponding distances. The returned value inherits from class Variogram
.
Author(s)
José Pinheiro and Douglas Bates [email protected]
References
Cressie, N.A.C. (1993), "Statistics for Spatial Data", J. Wiley & Sons.
See Also
Variogram
, Variogram.gls
, Variogram.lme
, plot.Variogram
Examples
fm1 <- lm(follicles ~ sin(2 * pi * Time) + cos(2 * pi * Time), Ovary, subset = Mare == 1) Variogram(resid(fm1), dist(1:29))[1:10,]
Copyright (©) 1999–2012 R Foundation for Statistical Computing.
Licensed under the GNU General Public License.