Skip to contents

The G_AA behind the book's epistatic GBLUP (Mrode & Pocrnic, 4th ed., Eqn 13.13 and Example 13.5, p.237-238): the Hadamard square of the additive genomic relationship, rescaled so the diagonal averages 1, G_AA = (G * G) / mean(diag(G * G)). Cheap on purpose, once a G exists, epistasis is one elementwise product away. The book notes this is the one non-additive term that visibly reordered the animals in its example.

Usage

g_epistasis(g)

Arguments

g

additive relationship matrix, usually g_matrix(); any square symmetric relationship works

Value

epistatic relationship matrix with the dimnames of g, raw like the input, ridge it before kernel() if g was singular

Examples

geno <- list(ids = c("a", "b"), m = rbind(c(0, 1, 2), c(2, 1, 0)))
g_epistasis(g_matrix(geno))
#>   a b
#> a 1 1
#> b 1 1