| asr_varioGram {asreml} | R Documentation |
Empirical variogram
Description
Calculates the empirical variogram from regular or irregular one- or two-dimensional data.
Usage
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,
...
)
Arguments
x |
Numeric vector of x coordinates, may also be a matrix or
data frame with two or three columns. If |
y |
Numeric vector of y coordinates. |
z |
The response vector. |
composite |
To be used for data on a regular grid. If |
model |
At the present, it can only be |
metric |
The distance between (x, y) points. Options are:
|
angle |
A vector of directions. Angles are measured in degrees
anticlockwise from the x axis (default = |
angle.tol |
The angle subtended by each direction. That is, an arc |
nlag |
The maximum number of lags (default = |
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 (default = |
grid |
If |
... |
Additional arguments, for example |
Details
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 are assumed sorted
with the x coordinates changing the fastest; the data are
sorted internally if this is not the case.
Value
A data frame including the following components:
x: The original x coordinates.y: The original y coordinates.gamma: The variogram estimate.distance: The average distance for pairs in the lag.np: The number of pairs in the lag.angle: Direction if not a regular grid.