knitr::opts_chunk$set(echo = TRUE)
if (params$isonline){ s_asm_ex08_p01_data_path <- "https://charlotte-ngs.github.io/asmss2022/data/asm_bw_flem.csv" } else { s_asm_ex08_p01_data_path <- file.path(here::here(), "docs", "data", "asm_bw_flem.csv") } n_nr_rep <- 5 n_sd_prop_bw <- 0.5
Simulate a dataset with repeated measurements of Body Weight
and Breed
. The following dataset can be used as a basis:
cat(s_asm_ex08_p01_data_path, "\n")
The generated dataset should have the following properties
Body Weight
and its Breed
should be contained in the dataset.r n_nr_rep
repeated observations of Body Weight
and Breed
.Body Weight
within the repeated observations of one animal should be r 100 * n_sd_prop_bw
% of the total phenotypic variance of Body Weight
determined from the given basis dataset.s_ex08_p02_data_path <- "https://charlotte-ngs.github.io/asmss2022/data/asm_ex08_p01_rep_obs.csv" if (!params$isonline) s_ex08_p02_data_path <- file.path(here::here(), "docs", "data", "asm_ex08_p01_rep_obs.csv")
Analyse the dataset generated in Problem 1 with a random effects model using the package lme4
. If you had difficulties to solve Problem 1, then you can also use the following dataset.
cat(s_ex08_p02_data_path, "\n")
lme4::lmer()
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.