plotVariofaces.data.frame {asremlPlus} | R Documentation |

Produces a plot for each face of an empirical 2D
`variogram`

based on supplied residuals from both an observed data set
and simulated data sets. Those from simulated data sets are used to
produce confidence envelopes If the data consists of sections, such as separate
experiments, the two variogram faces are produced for each section. This
function is less efficient in storage terms than `variofaces.asreml`

,
because here the residuals from all simulated data sets must be saved, in
addition to the values for the variogram faces; in
`variofaces.asreml`

, the residuals for each simulated data set are
discarded after the variogram has been calculated. On the other hand, the
present function is more flexible, because there is no restriction on how the
residuals are obtained.

## S3 method for class 'data.frame' plotVariofaces(data, residuals, restype="Residuals", ...)

`data` |
A |

`residuals` |
A |

`restype` |
A |

`...` |
Other arguments that are passed down to the function |

For each set of residuals, `asreml.variogram`

is used to obtain the empirical
variogram, from which the values for its faces are obtained. Plots are produced for
each face and include the observed residuals and the 2.5%, 50% & 97.5% quantiles.

A `list`

with the following components:

**face1:**a`data.frame`

containing the variogram values on which the plot for the first dimension is based.**face2:**a`data.frame`

containing the variogram values on which the plot for the second dimension is based.

Chris Brien

Stefanova, K. T., Smith, A. B. & Cullis, B. R. (2009) Enhanced diagnostics for the
spatial analysis of field trials. *Journal of Agricultural, Biological,
and Environmental Statistics*, **14**, 392–410.

`asremlPlus-package`

, `asreml`

, `asreml.variogram`

,
`variofaces.asreml`

, `simulate.asreml`

.

## Not run: data(Wheat.dat) current.asr <- asreml(yield ~ Rep + WithinColPairs + Variety, random = ~ Row + Column + units, residual = ~ ar1(Row):ar1(Column), data=Wheat.dat) current.asrt <- as.asrtests(current.asr, NULL, NULL) current.asrt <- rmboundary.asrtests(current.asrt) # Form variance matrix based on estimated variance parameters s2 <- current.asr$sigma2 gamma.Row <- current.asr$gammas[1] gamma.unit <- current.asr$gammas[2] rho.r <- current.asr$gammas[4] rho.c <- current.asr$gammas[5] row.ar1 <- mat.ar1(order=10, rho=rho.r) col.ar1 <- mat.ar1(order=15, rho=rho.c) V <- gamma.Row * fac.sumop(Wheat.dat$Row) + gamma.unit * diag(1, nrow=150, ncol=150) + mat.dirprod(col.ar1, row.ar1) V <- s2*V #Produce variogram faces plot (Stefanaova et al, 2009) resid <- simulate(current.asr, V=V, which="residuals") resid$residuals <- cbind(resid$observed[c("Row","Column")], resid$residuals) plotVariofaces(data=resid$observed[c("Row","Column","residuals")], residuals=resid$residuals, restype="Standardized conditional residuals") ## End(Not run)

[Package *asremlPlus* version 4.2-32 Index]