Applied Statistical Methods - Solution 3

Author

Peter von Rohr

Published

March 11, 2024

WebR Status

🟡 Loading...

Problem 1: Simple Linear Regression

Use the data on Width and Height that we collected during the class to fit a linear regression model to the data. Use the formula derived in class to compute estimates b^0 and b^1 for the intercept (b0) and the slope (b1) that define the linear regression line. Verify the obtained results using the function lm() in R.

Tasks

  • Read data from https://charlotte-ngs.github.io/asmasss2024/data/asm_width_height.csv using the function read.table()
  • Compute estimate b^1 for the slope b1 using the formula from class given as

b^1=(xy).−Nx¯.y¯.(x2).−Nx¯.2

  • Compute estimate b^0 for the slope b0 using the formula from class given as

b^0=y¯.−b^1x¯.

  • Validation with R