Application Exercise
You may use any notes, lectures, or your textbook. Do not work with anyone else on this assessment.
- 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 cheddar
data from the faraway package, run the code below to add a time variable.
library(faraway)
cheddar$time <- 1:nrow(cheddar)
- Fit a linear model predicting
taste
from Acetic
, H2S
and Lactic
.
- Plot the residuals from the model against
time
. What do you see?
- Fit a GLS model using AR(1) correlation. Is there evidence of correlation between the errors?