Skip to contents

Splits the numerator relationship by breed of origin after Garcia-Cortes and Toro (2006), the formulation of Mrode & Pocrnic (4th ed., section 14.3, Eqn 14.10, p.241-242). Each breed p gets a partial matrix built by the tabular method with the breed contribution on the diagonal, a_ii = c_i + 0.5 a_SD, where c_i is the fraction of genes from breed p; each pair of breeds gets a segregation matrix from the same recursion with c_i = 2 (f_pS f_qS + f_pD f_qD). The combined additive covariance is the variance-weighted sum of all of them (Eqn 14.1), and a model with one random term per matrix, kernel(id, K = ), one variance each, is the equivalent model 14.8, returning breed-specific breeding values that sum to the combined ones.

Usage

partial_a(ped, breed)

Arguments

ped

data.frame with animal, sire and dam, as in model(); unknown parent 0 or NA. Every animal must have both parents known or neither: with a single known parent the breed fractions are undefined, add the missing parent as a founder with a declared breed

breed

named character vector giving the breed of every FOUNDER: names are the founder ids, values the breed labels. Non-founders take the mean of their parents' fractions, so declaring them is an error, not a convenience

Value

list with three pieces, all rows in the topological order of pedigree(): f, the matrix of breed fractions (animals x breeds), the fixed breed regression of the book's model enters the data from here; h, the matrix of segregation coefficients (animals x breed pairs, columns named "p:q"); and K, the named list of partial relationship matrices ready for kernel(id, K = ), one per breed, plus one per breed pair that actually segregates (an all-zero segregation matrix is left out, there is nothing to estimate from it)

Details

An animal with no genes from a breed has a whole row of zeros in that partial matrix. Passed to kernel() as they come, those rows declare the level out of the term: no equation, zero incidence, exactly the generalized inverse with null rows the book uses (p.243-244). Do not trim or ridge them.

The matrices are DENSE and the recursion is quadratic in the pedigree, so this is for the moderate sizes where a multibreed pedigree analysis is actually run, not a national evaluation.

Examples

ped <- data.frame(animal = c("1", "2", "3", "4", "5"),
                  sire   = c("0", "0", "1", "1", "3"),
                  dam    = c("0", "0", "2", "2", "4"))
pa <- partial_a(ped, breed = c("1" = "A", "2" = "B"))
pa$f["3", ]              # the F1 cross: half A, half B
#>   A   B 
#> 0.5 0.5 
pa$K[["A"]]["3", "3"]    # partial diagonal 0.5
#> [1] 0.5
pa$h["5", "A:B"]         # the F2 segregates: h = 1 (an F1 does not, h = 0)
#> [1] 1
pa$K[["A:B"]]["5", "5"]
#> [1] 1