calcG {pedigree} | R Documentation |
Function to calculate a relationship matrix from marker data (usually allele count data), G matrix.
Description
Function to calculate a relationship matrix from marker data. Option
to return the inverse of matrix. Inverse calculated using
Matrix
package.
Usage
calcG(M, data = NULL,solve = FALSE)
Arguments
M |
Matrix of marker genotypes, usually the count of one of the two SNP alleles at each markers (0, 1, or 2). |
data |
Optional logical vector which can tell of which individuals we have phenotypes. |
solve |
Logic, if TRUE then function returns the inverse of the relationship matrix. |
Value
Matrix of class dgeMatrix
.
See Also
SamplePedigree
, gblup
,
makeAinv
,blup
Examples
example(gblup)
G <- calcG(M)
Ginv <- calcG(M,solve = TRUE)
[Package pedigree version 1.4.2 Index]