Contents Ordinary Least Squares

  1. Overview
  2. Theoretical Derivation of the Least Squares Estimator
  3. Gauss Markov Theorem
    1. Proof Gauss Markov Theorem
  4. Gauss Markov (OLS) Assumptions
    1. Linear Parameter and Correct Model Specification
    2. Full Rank of X Matrix
    3. Exogenous Explanatory Variables
    4. Independent and Identically Distributed Error Terms
      1. Consequences when the Expected Value of the Error Term is Non-Zero
      2. Consequences of Heteroscedasticity and how to solve them
        1. Calculate Robust Standard Errors
        2. Calculate Clustered Standard Errors
    5. Normal Distributed Error Terms
  5. Coefficient of Determination or R2
    1. Relationship between Coefficient of Determination & Squared Pearson Correlation Coefficient
  6. Linear Regression in R
    1. Calculate OLS estimator manually in R
    2. Construct the OLS estimator as a function in R
    3. Calculate Robust Standard Errors in R
    4. Calculate Clustered Standard Errors in R