knitr::opts_chunk$set(echo = TRUE)
s_ex03p01_data_path <- "https://charlotte-ngs.github.io/asmss2022/data/asm_flem_genomic_data.csv"

Problem 1: Linear Regression on Genomic Information

Use the following dataset which is also given in:

r s_ex03p01_data_path

to estimate marker effects for the single loci using a linear regression model.

tbl_ex03p01_data <- readr::read_csv(file = s_ex03p01_data_path)
knitr::kable(tbl_ex03p01_data,
             booktabs = TRUE,
             longtable = FALSE,
             escape = FALSE)

Your Solution

Problem 2: Regression On Dummy Variables

Use the dataset with the breeds assigned to every animal and find out the influence of the breed on the response variable body weight. The data is available from

s_ex03p02_data_path <- "https://charlotte-ngs.github.io/asmss2022/data/asm_bw_flem.csv"
s_ex03p02_data_path

Start by fitting a linear model with Breed as the only factor in the model, hence ignore the independent variables such as Breast Circumference, BCS and HEI.

Your Solution

Problem 3: Estimable Function

Use the matrix vector-notation to setup the model for a regression on dummy variable with the data on breeds and body weight as used in Problem 2. The aim of this problem is to find the estimable functions used in the output of lm().

The model is given by

$$\mathbf{y} = \mathbf{Xb} + \mathbf{e}$$

Setup the least squares normal equations. Find a solution for $\mathbf{b}^0$ and construct the estimable function that is used in the output lm().

Your Solution

cat('\n---\n\n _Latest Changes: ', format(Sys.time(), '%Y-%m-%d %H:%M:%S'), ' (', Sys.info()['user'], ')_\n', sep = '')


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