Application Exercise
- Open Rstudio Server Pro
- Create a new project
- Click File > New File > R Markdown
- Delete everything except for
---
title: "Untitled"
output: html_document
---
- Give your work a sensible title
- When you’ve finished, upload the .html file to Canvas
Using the data above calculate:
\[\hat{\textrm{var}}(y_{i} - \hat{y}_{(i)}) = \hat{\sigma}^2_{(i)}(1+x_i^T(\mathbf{X}_{(i)}^T\mathbf{X}_{(i)})^{-1}x_i)\]
- Using the data above, calculate \(\hat{\textrm{var}}(\hat{y})_{(i)}\) for observation 5.
- Calculate the studentized residuals for the data above.
- Calculate Cook’s Distance for the data above and plot it with the row number on the x-axis and Cook’s Distance on the y-axis.