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 asreml.

type

Type of residuals, see residuals.asreml for more details (default = "default").

spatial

Whether to include a nugget effect; see residuals.asreml for more details (default = "trend").

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 pattern argument of coef.asreml.

composite

Argument to asr_varioGram. To be used for data on a regular grid. If TRUE, the average of the variograms in quadrants (x, y) and (x, -y) is returned. Otherwise, both variograms are returned and identified as quadrants 1 and 4 (default = TRUE).

model

Argument to asr_varioGram. At the present, it can only be "empirical".

metric

Argument to asr_varioGram. The distance between (x, y) points. Options are: "euclidean" or "manhattan" (default = "euclidean").

angle

Argument to asr_varioGram. A vector of directions. Angles are measured in degrees anticlockwise from the x axis (default = 0).

angle.tol

Argument to asr_varioGram. The angle subtended by each direction. That is, an arc angle +/- angle.tol/2 (default = 180, which gives an omnidirectional variogram).

nlag

Argument to asr_varioGram. The maximum number of lags (default = 20).

maxdist

Argument to asr_varioGram. The fraction of the maximum distance to include in the calculation. The default is half the maximum distance in the data: 0.5.

xlag

Argument to asr_varioGram. The width of the lags (default = NA).

lag.tol

Argument to asr_varioGram. The distance tolerance (default = 0.5).

grid

Argument to asr_varioGram. If FALSE, forces polar variograms if (x, y) specifies a regular grid (default = TRUE).

...

Additional arguments.

Details

Calls asr_varioGram to calculate the empirical semi-variogram.

Value

A data frame including the following components:

Examples

## Not run: 
data(barley)
shf.vsr <- asreml(yield ~ Variety, residual = ~ ar1(Row):ar1(Column),
                  data = shf)
variogram(shf.vsr)

## End(Not run)


[Package asreml version 4.2.0.480 Index]