asr_varioGram {asreml} | R Documentation |
Calculates the empirical variogram from regular or irregular one or two dimensional data.
asr_varioGram(x, y, z, composite = TRUE, model = c("empirical"), metric = c("euclidean", "manhattan"), angle = 0, angle.tol = 180, nlag = 20, maxdist = 0.5, xlag = NA, lag.tol = 0.5, grid = TRUE)
x |
Numeric vector of x coordinates, may also be a matrix or
data frame with 2 or 3 columns. If |
y |
Numeric vector of y coordinates. |
z |
The response vector. |
composite |
For data on a regular grid. If |
model |
Can only be |
metric |
The distance between (x,y) points. Valid measures are
|
angle |
A vector of directions. Angles are measured in degrees anticlockwise from the x axis. Default is 0. |
angle.tol |
The angle subtended by each direction. That is, an arc |
nlag |
The maximum number of lags; default is 20. |
maxdist |
The fraction of the maximum distance to include in the calculation. The default is half the maximum distance in the data. |
xlag |
The width of the lags. If missing, |
lag.tol |
The distance tolerance. If missing, |
grid |
If FALSE, forces polar variograms if (x,y) specifies a
regular grid; default is |
For one dimensional data the y coordinates need not be
supplied and a vector of ones is generated. The function identifies
data on a complete regular array and in such cases only computes
polar variograms If grid = FALSE
. The data is assumed sorted
with the x coordinates changing the fastest; the data is
sorted internally if this is not the case.
A data frame including the following components:
The original x coordinates.
The original y coordinates.
The variogram estimate.
The average distance for pairs in the lag.
The number of pairs in the lag.
Direction if not a regular grid.
Webster W, Oliver MA (2001). Geostatistics for Environmental Scientists. John Wiley: West Sussex.