knitr::opts_chunk$set(echo = FALSE)

Extension of Dataset on Body Weight

s_data_dir <- file.path(here::here(), "docs", "data")
s_flem_path <- file.path(s_data_dir, "asm_bw_flem.csv")
tbl_flem <- readr::read_csv(file = s_flem_path)
tbl_flem <- dplyr::rename(tbl_flem, BC = `Breast Circumference`)
knitr::kable(tbl_flem,
             booktabs = TRUE,
             longtable = TRUE,
             escape = FALSE)

Include Breed into Model

Breed Codes

n_nr_breed <- nlevels(as.factor(tbl_flem$Breed))
tbl_breed_map <- tibble::tibble(Code = c(1:n_nr_breed),
                                Breed = c(unique(sort(tbl_flem$Breed))))
knitr::kable(tbl_breed_map,
             booktabs = TRUE,
             longtable = TRUE,
             escape = FALSE)

Modelling Effect of Breed

$$E(y_i) = b_0 + b_1 x_i$$

Problems

\begin{align} E(\text{BW Angus}) &= b_0 + b_1 \notag \ E(\text{BW Limousin}) &= b_0 + 2b_1 \notag \ E(\text{BW Simmental}) &= b_0 + 3b_1 \notag \end{align}

This means, for example, that

\begin{align} E(\text{BW Limousin}) - E(\text{BW Angus}) &= \notag \E(\text{BW Simmental}) - E(\text{BW Limousin}) \notag \ E(\text{BW Simmental}) - E(\text{BW Angus}) &= \notag \ 2 \left[ E(\text{BW Limousin}) - E(\text{BW Angus})\right] \notag \end{align}

Consequences

Linear Regression Analysis for Genomic Data

#rmddochelper::use_odg_graphic(ps_path = "odg/datastucturegbv.odg")
knitr::include_graphics(path = "odg/datastucturegbv.png")


charlotte-ngs/asmss2022 documentation built on June 7, 2022, 1:33 p.m.