Problem 1: Sire Model

Use the following dataset to predict breeding values using a sire model. The dataset is available from

https://charlotte-ngs.github.io/asmss2022/data/asm_ped_sim_data.csv 

Hints

Your Solution

  • Read the data

  • Compute the inverse sire relationship matrix

  • Setup the mixed model equations

  • Solve mixed model equations

Problem 2: Animal Model

Use the same dataset as in Problem 1 to predict breeding values, but use an animal model instead of a sire model. The dataset is available from

https://charlotte-ngs.github.io/asmss2022/data/asm_ped_sim_data.csv 

Hints

Your Solution

  • Read the data

  • Compute the inverse sire relationship matrix

  • Setup the mixed model equations

  • Solve mixed model equations

Problem 3: Model Comparison

Compare the order of the predicted breeding values for the sires from the sire model and from the animal model.

Your Solution

  • Compare both ordered vectors of predicted breeding values

Latest Changes: 2022-05-23 04:55:27 (pvr)

LS0tCnRpdGxlOiBBcHBsaWVkIFN0YXRpc3RpY2FsIE1ldGhvZHMgLSBOb3RlYm9vayAxMAphdXRob3I6IFBldGVyIHZvbiBSb2hyCmRhdGU6ICcyMDIyLTA1LTE2JwpvdXRwdXQ6IGh0bWxfbm90ZWJvb2sKcGFyYW1zOgogIGRvY3R5cGU6CiAgICBsYWJlbDogRG9jdW1lbnQgVHlwZQogICAgdmFsdWU6IHNvbHV0aW9uCiAgICBjaG9pY2VzOgogICAgLSBleGVyY2lzZQogICAgLSBzb2x1dGlvbgogICAgLSBub3RlYm9vawogIGlzb25saW5lOgogICAgbGFiZWw6IE9ubGluZSAoeS9uKQogICAgdmFsdWU6IHRydWUKICAgIGNob2ljZXM6CiAgICAtIHRydWUKICAgIC0gZmFsc2UKLS0tCgoKCmBgYHtyIHNldHVwLCBpbmNsdWRlPUZBTFNFfQprbml0cjo6b3B0c19jaHVuayRzZXQoZWNobyA9IFRSVUUpCmBgYAoKCgojIyBQcm9ibGVtIDE6IFNpcmUgTW9kZWwKYGBge3IgZXgxMHAwMS1zZXR1cCwgZWNobz1GQUxTRX0Kc19leDEwX3AwMV9kYXRhX3BhdGggPC0gImh0dHBzOi8vY2hhcmxvdHRlLW5nc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