knitr::opts_chunk$set(echo = TRUE)
# rmdhelp::show_knit_hook_call()
knitr::knit_hooks$set(hook_convert_odg = rmdhelp::hook_convert_odg)

Problem 1: Inverse Numerator Relationship Matrix

During the lecture the method of computing the inverse numerator relationship matrix $A^{-1}$ directly was introduced. The computation is based on the LDL-decomposition. As a result, we can write

$$A^{-1} = (L^T)^{-1} \cdot D^{-1} \cdot L^{-1}$$ where $L^{-1} = I-P$, and $D^{-1}$ is a diagonal matrix with $(D^{-1})_{ii} * \sigma_u^{-2} = var(m_i)^{-1}$.

Tasks

Pedigree

nr_animal <- 6
tbl_pedigree <- tibble::tibble(Calf = c(1:nr_animal),
                               Sire = c(NA, NA, NA, 1 ,3, 4),
                               Dam = c(NA, NA, NA, 2, 2, 5))
tbl_pedigree

Solution

Problem 2: Rules

The following diagram helps to illustrate the rules for constructing $A^{-1}$

#rmdhelp::use_odg_graphic(ps_path = "odg/inv-num-mat.odg")
knitr::include_graphics(path = "odg/inv-num-mat.png")

Tasks

Solution



charlotte-ngs/lbgfs2021 documentation built on Dec. 19, 2021, 3:01 p.m.