Application Exercise Derive the Hat Matrix

In the Derive the Hat Matrix video, I derive the hat matrix. I skip a few steps when taking the derivative of (yXβ)T(yXβ). Fill in these steps and derive the hat matrix here (using LATEX). Don’t remember all of the LATEX symbols? Here is a cheat sheet.

Start with the sum of squared residuals:

ϵ2=ϵTϵ=(yXβ)T(yXβ)

  1. Open Rstudio Server Pro
  2. Create a new project (call it something sensible, perhaps 02-appex-hat-matrix)
  3. Click File > New File > R Markdown
  4. Delete everything except for
---
title: "Untitled"
output: html_document
---
  1. Give your work a sensible title
  2. After adding your derivation to the file (remember you can incorporate LATEX by wrapping in $$), knit it.
  3. When you’ve finished, upload the .html file to Canvas