variogram {SpATS}R Documentation

Sample variogram

Description

Computes the sample variogram from an SpATS object.

Usage

## S3 method for class 'SpATS'
variogram(x, ...)

Arguments

x

an object of class SpATS as produced by SpATS().

...

further arguments passed to or from other methods. Not yet implemented

Details

The present function computes the sample variogram on the basis of the (deviance) residuals of the fitted model. Currently, the function can only be applied for regular two-dimensional data, i.e, when the plots of the field are arranged in a regular two-dimensional array (usually defined by the column and row positions). For each pair of (deviance) residuals eie_i and eje_j, the half-squared difference is computed

vij=0.5(eiej)2,v_{ij} = 0.5(e_i - e_j)^2,

as well as the corresponding column (cdijcd_{ij}) and row displacements (rdijrd_{ij}), with

cdij=cicjcd_{ij} = |c_i - c_j|

and

rdij=rirj,rd_{ij} = |r_i - r_j|,

where ckc_k and rkr_k denote the column and row position of plot kk respectively. The sample variogram is then defined as the triplet

(cdij,rdij,vˉij),(cd_{ij}, rd_{ij}, \bar{v}_{ij}),

where vˉij\bar{v}_{ij} denotes the average of the vijv_{ij} that share the same column and row displacements. For a more detailed description, see Gilmour et al. (1997).

Value

An object of class variogram.SpATS with the following components:

data

data frame including the following information: “value”: the value of the sample variogram at each pair of column and row displacements; and “length”: the number of observations used to compute the sample variogram at the corresponding pair of displacements.

col.displacement

numerical vector containing the column displacements

row.displacement

numerical vector containing the row displacements

References

Gilmour, A.R., Cullis, B.R., and Verbyla, A.P. (1997). Accounting for Natural and Extraneous Variation in the Analysis of Field Experiments. Journal of Agricultural, Biological, and Environmental Statistics, 2, 269 - 293.

Stefanova, K.T., Smith, A.B. and Cullis, B.R. (2009). Enhanced Diagnostics for the Spatial Analysis of Field Trials. Journal of Agricultural, Biological, and Environmental Statistics, 14, 392 - 410.

See Also

SpATS, plot.variogram.SpATS

Examples

library(SpATS)
data(wheatdata)
wheatdata$R <- as.factor(wheatdata$row)
wheatdata$C <- as.factor(wheatdata$col)

m0 <- SpATS(response = "yield", spatial = ~ SAP(col, row, nseg = c(10,20), degree = 3, pord = 2), 
genotype = "geno", fixed = ~ colcode + rowcode, random = ~ R + C, data = wheatdata, 
control =  list(tolerance = 1e-03))

# Compute the variogram
var.m0 <- variogram(m0)
# Plot the variogram
plot(var.m0)

[Package SpATS version 1.0-18 Index]