Lekser / Exercises

  • Week 1:
    • no exercises
  • Week 2:
    • exercises 2.1 - 2.5, 2.7, 2.11 of the text book. (solutions R)
  • Week 3:
  • Week 4:
    • Exercises 3.1 - 3.4 of the text book.
    • Solutions
  • Week 5:
    • Exercises 5.2 and 5.8 in ITSL book;
    • Download the body fat data (here the R code to do that). It contains a response variable (pcfat, percentage of body fat) and 13 explanatory variables (age and 12 measures of different body part circumferences). Fit a linear Gaussian model by using both backward elimination and forward selection, in both cases using AIC as stopping criterion. Do you obtain the same model with both procedures? Comment the result.
    • Solutions
  • Week 6:
    • For Gaussian linear regression, show that the variance of the ridge estimator is smaller than the variance of the ordinary least square estimator;
    • Exercises 6.3, 6.4, 6.10 and 6.11 in ISL book (note that the dataset for the last exercises is in the R-package MASS).
    • Solutions, code.
  • Week 7:
    • Exercises 4.3 and 4.5 of the text book;
    • Exercises 7.2, 7.3, 7.5, 7.6, 7.9, 7.11 and 7.12 in ISL book, pages 298-301 (note that the dataset for exercise 7.6 is in the R-package ISLR, that for exercise 7.9 in the R-package MASS).
    • Solutions, code.
  • Week 8:
    • Exercises  5.3, 5.4 and 5.5 of the text book;
    • Exercises 4.1, 4.9 and 4.10 (a, b, c and d) in ISL book, pages 168-171
    • Solutions
  • Week 9:
  • Week 10:
    • Exercises 4.8 and 5.11 of the text book;
    • Exercises 8.3 and 8.8 (points (a), (b) and (c)) in ISL book, pages 332 and 333)
    • Solutions and code
  • Week 13:
  • Week 14:
    • Exercises 10.1 (page 413), 10.3 (page 414) and 10.10 (page 417) in ISL book
    • Solutions, code
  • Week 15:
    • Exercises 10.4 (page 414) and 10.9 (page 416) in ISL book
    • Code
Publisert 14. jan. 2019 10:57 - Sist endret 16. nov. 2023 11:45