| varioGram.asreml {asreml} | R Documentation |
Empirical variogram constructor method
Description
Function that calculates the empirical variogram from an asreml object.
Usage
## S3 method for class 'asreml'
varioGram(
object,
type = "default",
spatial = "trend",
formula = ~NULL,
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
object |
An object of class |
type |
Type of residuals, see |
spatial |
Whether to include a nugget effect; see |
formula |
An optional model formula designed to extract residuals from the random component of the model rather than the residual component. This is a two-sided
formula where the response is a pattern in the style required by
the |
composite |
Argument to |
model |
Argument to |
metric |
Argument to |
angle |
Argument to |
angle.tol |
Argument to |
nlag |
Argument to |
maxdist |
Argument to |
xlag |
Argument to |
lag.tol |
Argument to |
grid |
Argument to |
... |
Additional arguments. |
Details
Calls asr_varioGram to calculate the empirical
semi-variogram.
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.
Examples
## Not run:
data(barley)
shf.vsr <- asreml(yield ~ Variety, residual = ~ ar1(Row):ar1(Column),
data = shf)
variogram(shf.vsr)
## End(Not run)