\usepackage{fvextra} \DefineVerbatimEnvironment{Highlighting}{Verbatim}{breaklines,commandchars=\\\{\}}

Linear regression

Author

Olga Dethlefsen

Linear models allows us to answer questions such as:

Learning outcomes

  • to understand what a linear model is and be familiar with the terminology
  • to be able to state linear model in the general vector-matrix notation
  • to be able to use the general vector-matrix notation to numerically estimate model parameters
  • to be able to use lm() function for model fitting, parameter estimation, hypothesis testing and prediction
  • to be able to evaluate model fit by interpreting \(R^2\) and \(R^2(adj)\) values
  • to be able to check model assumptions
  • to be able to use glm() for extending linear models into generalized linear models