The D of Vitezica et al. (2013), the parametrization the book adopts for its GBLUP
dominance model (Mrode & Pocrnic, 4th ed., Eqn 13.6, p.231, and Example 13.3, p.233):
each genotype 0, 1, 2 is coded -2p^2, 2pq, -2q^2 and
D = W W' / sum((2 p q)^2), frequencies from the genotyped animals themselves. Under
Hardy-Weinberg equilibrium this partition is orthogonal to the additive one, which is
why the additive and the dominance term enter the model as separate covariance
groups. Like g_matrix(), the result is raw and may need a ridge before entering
kernel().