R: Construct an object of class 'dmm' from user-supplied data
make.dmmobj
R Documentation
Construct an object of class dmm from user-supplied data
Description
Construct an object of class dmm containing all attributes needed to run the gresponse() function. The user must supply a phenotypic covariance matrix, and a genetic covariance matrix for each of the components needed by gresponse()
A phenotypic covariance matrix. Dimnames for rows and columns must be set to the trait names
components
A character vector specifying names of all of the genetic variance components for which a genetic covariance matrix is to be supplied. If there are genetic covariance components ( eg "CovG(Ia,Ma)"), these must be listed after all the genetic variance components
...
A variable number of genetic covariance matrices, one for each of the names listed in the components argument. Each matrix must have dimnames the same as the phenotypic covariance matrix
Details
Only the minimal attributes for use by the gresponse() function are constructed. The remainder are set to NULL
Value
An object of class dmm. Only the following attributes contain data
b
A dummy set of fixed effects
siga
A matrix of genetic variance (and covariance) components set out one component per row and the traitpairs in columns
variance.components
A matrix of genetic variance (and covariance) components with the phenotypic covariance matrix appended
phenotypic.variance
A matrix of phenotypic covariances set out one trait per row and per column
Note
If matrices are supplied which are not positive definite, function make.dmmobj() will alter them to the nearest positive definite matrix using routine neadPD() from package Matrix. No message is given. Check the value returned to see if matrices have been adjusted.