--- title: 'Laboratory Exercise Week 12' author: "Your Name and Section, 10 pts" date: "Todays Date" output: word_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` *Directions*: * Write your R code inside the code chunks after each question. * Write your answer comments after the `#` sign. * To generate the word document output, click the button `Knit` and wait for the word document to appear. * RStudio will prompt you (only once) to install the `knitr` package. * Submit your completed laboratory exercise using Blackboard's Turnitin feature. Your Turnitin upload link is found on your Blackboard Course shell under the Laboratory folder. *** For this exercise, you will need to use the packages `mosaic` and `dplyr` to find numerical and graphical summaries. ```{r warning=FALSE, message=FALSE} # install packages if necessary if (!require(mosaic)) install.packages(`mosaic`) if (!require(dplyr)) install.packages(`dplyr`) # load the package in R library(mosaic) # load the package mosaic to use its functions library(dplyr) # load the package dplyr to use data management functions ``` 1. Data from the US Federal Reserve Board (2002) on the percentage of disposable personal income required to meet consumer load payments and mortgage payments for selected years are found in the data below ```{r} debt <- read.csv("https://www.siue.edu/~jpailde/debt.csv") debt ``` i) Compute the mean and standard deviation of the two variables in the data set. Describe each variable using these sample characteristics. ii) What is the value of the correlation coefficient for this data set? iii) Construct a scatterplot for this data set. iv) Based on parts (ii) and (iii), is it reasonable to conclude in this case that there is no strong relationship between the variables (linear or otherwise)? ### Code chunk ```{r} # start your code # last R code line ``` 2. The data below contains sale price, size, and land-to-building ratio for 10 large industrial properties ```{r} saleprice <- read.csv("https://www.siue.edu/~jpailde/saleprice.csv") saleprice ``` i) Construct scatterpots for `sale price versus size` and `sale price versus land-to-building ratio`. Be sure to fit regression lines on the scatterplots. ii) Calculate and interpret the value of the correlation coefficients on `sale price versus size` and `sale price versus land-to-building ratio`. iii) Use the `lm` function to estimated the equations of each fitted line for for `sale price versus size` and `sale price versus land-to-building ratio`. Give an interpretation of the slopes for each line. iv) Which model would you use to explain the behavior of sale price? Why? ### Code chunk ```{r} # start your code # last R code line ```