LBG - FS2024 – Exercise 5

Author

Peter von Rohr

Problem 1: Sire Model

As already shown during the lecture for the small data set at

https://charlotte-ngs.github.io/lbgfs2024/data/small_beef_data.csv

a sire model is to be used for the following dataset, already used in Exercise 4. The data set is available from

https://charlotte-ngs.github.io/lbgfs2024/data/beef_data_bc.csv

The ration λs between the residual variance and the sire variance can be assumed to be

λs=σe2σs2=1

Solution

# read the data
s_beef <- 'https://charlotte-ngs.github.io/lbgfs2024/data/beef_data_bc.csv'
tbl_beef <- readr::read_delim(s_beef, delim = ",")
_webr_editor_1 = Object {code: null, options: Object, indicator: Ke}
  • Design matrix X
# design matrix X
_webr_editor_2 = Object {code: null, options: Object, indicator: Ke}
  • Design matrix Z
# design matrix Z
_webr_editor_3 = Object {code: null, options: Object, indicator: Ke}
  • Coefficient matrix of mixed model equations
# coefficient matrix
_webr_editor_4 = Object {code: null, options: Object, indicator: Ke}
  • Right-hand side of mixed model equations
# right-hand side
_webr_editor_5 = Object {code: null, options: Object, indicator: Ke}
  • Solve mixed model equations
# solve mme
_webr_editor_6 = Object {code: null, options: Object, indicator: Ke}
  • Identify estimates of fixed effects and predictions of sire effects
# fixed effects estimates

# predictions of sire effects
_webr_editor_7 = Object {code: null, options: Object, indicator: Ke}
Downloading webR