knitr::opts_chunk$set(echo = TRUE)
s_ex05p01_data_path <- "https://charlotte-ngs.github.io/asmss2022/data/asm_bw_flem.csv"
# s_ex05p01_data_path <- file.path(here::here(), "docs", "data", "asm_bw_flem.csv")

Problem 1: Helmert Contrasts

Use the dataset of Body Weight and Breed to fit a linear model of Body Weight on Breed. The aim of this exercise is to use the Helmert-contrasts instead of the defautl Treatment contrasts. What are the estimable functions used in the Helmert-Contrasts and what are the effects that are reported for the different levels of the factor Breed? Verify your answer by comparing estimable functions of solutions of the least squares normal equations to the effects of lm().

The dataset is available under

cat(s_ex05p01_data_path, "\n")

Hint

Your Solution

vec_nobs <- c(10,30,100)
s_ex05p02_data_path <- "https://charlotte-ngs.github.io/asmss2022/data/asm_bw_flem.csv"
# s_ex05p02_data_path <- file.path(here::here(), "docs", "data", "asm_bw_flem.csv")

Problem 2: Simulation

Use the results of the regression of Body Weight on Breast Circumference and simulate three datasets with r vec_nobs[1], r vec_nobs[2] and r vec_nobs[3] observations respectively. What is the number of observations required to obtain the same regression results from the simulated dataset that you used in the simulation?

The original dataset is available under:

cat(s_ex05p02_data_path, "\n")

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.