variogram.asreml | R Documentation

## Empirical Variogram

### Description

A method to calculate the empirical variogram from an `asreml` object.

### Usage

    variogram.asreml(object, 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 `asreml`
`formula` | an optional model formula designed to extract "residuals" from the random (G) component of the model rather than the residual (R) component. This is a two sided formula where the response is a pattern in the style required by the `pattern` argument of `coef.asreml`.
`composite` | the argument to `asreml.variogram`
`model` | the argument to `asreml.variogram`
`metric` | the argument to `asreml.variogram`
`angle` | the argument to `asreml.variogram`
`angle.tol` | the argument to `asreml.variogram`
`nlag` | the argument to `asreml.variogram`
`maxdist` | the argument to `asreml.variogram`
`xlag` | the argument to `asreml.variogram`
`lag.tol` | the argument to `asreml.variogram`
`grid` | the argument to `asreml.variogram`

### Details

Calls `asreml.variogram` to calculate the empirical semi-variogram.

### Value

An object of class `asrVariogram` that includes all components returned from `asreml.variogram` plus the following:

`group` | A character vector identifying any grouping structure, for example, that which would arise as a result of fitting independent error sections in `asreml`.
`names` | A list with components `x`, `y` and `groups`, each of which is a character string identifying the associated component of the dataframe.

### Author(s)

David Butler

### See Also

`asreml.variogram` `plot.asrVariogram`

### Examples

    data(barley,package="asreml3")
    ba.asr <- asreml(yield ~ Variety, rcov = ~ ar1(Row):ar1(Column),
                     data=barley)
    variogram(ba.asr)