Applied Statistical Methods - Exercise 4
Problem 1: Matrix-Vector Notation
Use the dataset on Body Weight
and Breast Circumference
to show that the matrix-vector notation of the regression model yields the same result as the scalar notation.
Tasks
- Read data from https://charlotte-ngs.github.io/asmasss2024/data/asm_bw_bc_reg.csv
- Set up the matrix \(X\) and the vector \(y\)
the vector \(y\) is taken from the dataset directly
- Compute the solution for \(\hat{b}\)
Problem 2: Multiple Linear Regression
Use the dataset on Body Weight
and multiple other predictor variables to fit a multiple linear regression.
The dataset is available from https://charlotte-ngs.github.io/asmasss2024/data/asm_bw_mult_reg.csv.
Tasks
The same as in Problem 1
- Read data from https://charlotte-ngs.github.io/asmasss2024/data/asm_bw_mult_reg.csv
- Set up the matrix \(X\) and the vector \(y\)
the vector \(y\) is taken from the dataset directly
- Compute the solution for \(\hat{b}\)
- Validation with
lm()
in R