estimateV.asreml {asremlPlus} | R Documentation |
Forms the estimated variance, random or residual matrix for the observations from the variance parameter estimates.
Description
Forms the estimated variance (V), random (G) or (R) matrix
for the observations, a square symmetric matrix of order equal to the number of
observations. The estimates of the variance parameters and the information about
the random
and residual
models for which they were estimated are
obtained from the asreml
object.
This function is not available in ASReml-R version 3.
Usage
## S3 method for class 'asreml'
estimateV(asreml.obj, which.matrix = "V",
extra.matrix = NULL, ignore.terms = NULL, fixed.spline.terms = NULL,
bound.exclusions = c("F","B","S","C"), ...)
Arguments
asreml.obj |
An |
which.matrix |
A |
extra.matrix |
A |
ignore.terms |
A |
fixed.spline.terms |
A |
bound.exclusions |
A |
... |
Provision for passing arguments to functions called internally - not used at present. |
Details
The information about the variance parameters in the fitted mixed model are obtained
from the G.param
and R.param
components of the asreml
object. The
function can deal with the following variance functions in either the random
or
residual
models: id
, diag
, us
, ar1
, ar2
,
ar3
, sar
,sar2
, ma1
, ma2
, arma
, exp
,
gau
, cor
, corb
and corg
. All of these functions,
except us
, can be combined with either v
or h
. It will also cope
with the following functions in the random
model: at
, str
,
spl
, dev
, grp
, fa
and rr
. Additionally, it can deal
with the function dsum
in the residual
model. For further information see
the ASReml-R User Guide Version 4 (Butler et al., 2023).
Value
A matrix
containing the estimated variance matrix. It has an attribute
missing.termmatrix
(use attr(x, which = "missing.termmatrix")
to access the
atrribute). It will be NULL
, unless the design matrix could not be obtained for
one or more model terms. If is is not NULL
, it will be a list of terms that could
not be produced for inclusion in the variance matrix estimate, and NA
will be
returned for the estimated variance matrix.
Author(s)
Chris Brien
References
Butler, D. G., Cullis, B. R., Gilmour, A. R., Gogel, B. J. and Thompson, R. (2023). ASReml-R Reference Manual Version 4.2. VSN International Ltd, https://asreml.kb.vsni.co.uk/.
See Also
asreml
, simulate.asreml
, variofaces.asreml
.
Examples
## Not run:
data(Wheat.dat)
current.asr <- asreml(yield ~ Rep + WithinColPairs + Variety,
random = ~ Row + Column + units,
residual = ~ ar1(Row):ar1(Column),
data=Wheat.dat)
# Form variance matrix based on estimated variance parameters
V <- estimateV(current.asr)
## End(Not run)