Appex 14

STA 112 - Fall 2022

Part 1

  1. Copy the following template into RStudio Pro:
https://github.com/sta-112-f22/appex-14.git
  1. What are the variables in the Diamonds dataset?
  2. What are the levels of the Clarity variable in the Diamonds data?
  3. Fit a model with TotalPrice as the outcome and Clarity as the explanatory variable
  4. Change the referent category to SI1 and refit the model
  5. Add the variable Depth to your model. How do you interpret the coefficient for this parameter?

Part 2

  1. Open appex-14.qmd
  2. Fit the model \(TotalPrice = \beta_0 + \beta_1Carat + \beta_2 Carat^2 + \beta_3 Color+\epsilon\)
  3. Find the 0.25 quantile and 0.75 quantile of Carat
  4. What is the interpretation of \(\hat\beta_1\), \(\hat\beta_2\), and \(\hat\beta_3\)?