Appex 10
STA 112 - Fall 2022
Part 1
- Create a new project from this template in RStudio Pro:
https://github.com/sta-112-f22/appex-10.git
- Load the packages and data by running the top chunk of R code
- Learn about the
USstamps
data by running?USstamps
in your Console - Use the
filter
function to remove observations with Year less than 1958 - Fit a linear model predicting the stamp price from year
- Calculate the studentized residuals and plot them – are there any outliers?
- If you found an outlier, refit the model without it – is this point “influential”?
Part 2
- Go to https://lucy.shinyapps.io/magnolia-data/
- “Measure” 30 leaves by clicking on on 30 leaves in the photo of the Mag Quad.
- Copy the code on the right and paste it in your
appex-10.qmd
file. Run the code to create a data frame calledmagnolia_data
- Fit a linear model predicting leaf length from leaf width from your magnolia data. What is your estimate for \(\hat\beta_1\)? Create a confidence interval for this estimate.