1. Home
  2. ASReml-R 4 Commands
  3. knownStruc – Known variance structures

knownStruc – Known variance structures


knownStruc is a model function associating a known variance structure with a factor in the data.


vm(obj, source, singG=NULL)

obj A factor in data.
source The known inverse or relationship matrix:

  • a sparse inverse variance matrix held in three column co-ordinate form in row major order. This triplet matrix must have class ginv from a call to ainverse(), or have attribute INVERSE set to TRUE. For backwards compatability, a three column data frame is also accepted. In either case, the source must have a rowNames attribute.
  • a sparse relationship matrix held in three column co-ordinate form (as a matrix) in row major order. If the attribute INVERSE is not set then FALSE is assumed; a rowNames attribute must be set.
  • a matrix (or Matrix object) with a dimnames attribute giving the levels of the model term being defined. This may be a relationship matrix or its inverse; if an inverse, it must have an attribute INVERSE set to TRUE.
  • a numeric vector of the lower triangular elements in row major order. The vector must have a rowNames attribute, and if an inverse structure, it must also have an INVERSE attribute set to TRUE.
singG Ignored if source has class ginv or attribute INVERSE=TRUE; in such cases source must be one of:

  • a sparse matrix in coordinate form with class ginv, or attribute INVERSE=TRUE, or
  • an object of class matrix or Matrix with INVERSE=TRUE), or
  • a vector assumed to be the lower triangle in row major order with attribute INVERSE=TRUE.

If source does not have class ginv, or the attribute INVERSE is FALSE or is not set, and singG is NULL (the default), then source is assumed a positive definite relationship matrix and singG is reset to “PD“. Otherwise, a character string giving the state of the (to be inverted) source object:

“PD” positive definite (default)

“ND” source is non-singular indefinite (positive and negative roots). In this case asreml ignores the indefinite condition and proceeds

“PSD” source is positive semi-definite. In this case, asreml proceeds using lagrangian multipliers to process the matrix. Two cases arise: whether the singularity arises because of an effect has zero variance or whether it arises as a linear dependence. An example of the first is when the GRM represents a dominance matrix, and the list of genotypes includes fully inbred individuals which by definition have no dominance. An example of the second is when the list of genotypes includes clones

“NSD” source is singular indefinite (positive, zero and negative roots). The indefinite condition is ignored and asreml proceeds using lagrangian multipliers as for “PSD” matrices


If source inherits from class Matrix, asreml will convert source internally to either sparse triplet form (class dsparseMatrix), or dense vector form (class ddenseMatrix) for processing.

asr_vm: Create a model term associating a known relationship structure in source with a factor in data.
asr_ide: Create a term with the levels of vm, and modelled by the homogeneous form of the identity variance structure. The vm term must precede ide in the model for the factor levels to be found.
Updated on August 7, 2018

Was this article helpful?

Related Articles