knitr::opts_chunk$set(echo = TRUE)
Use the dataset milk
from package pedigreemm
and fit a sire model to each of the response variables (milk
, fat
, prot
and scs
) in the data. The dataset can be loaded using the command pedigreemm::milk
. The other variables like lact
and herd
can be used as fixed effects. The sire
column is used as a random effect. For this analysis, we assume that sires are unrelated.
milk
dataset from package pedigreemm
using the function lme4::lmer()
for all given response variables. You can use the same model for each of the responses.$$h^2 = \frac{4* \sigma_s^2}{\sigma_p^2} $$
summary()
of all the predicted sire breeding values. Solutions for the sire breeding values are obtained using the function ranef()
cat('\n---\n\n _Latest Changes: ', format(Sys.time(), '%Y-%m-%d %H:%M:%S'), ' (', Sys.info()['user'], ')_\n', sep = '')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.