#3. (8+8+6=22 points) (Linear Regression using R) In this problem you will be working with the Credit data frame from th
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
#3. (8+8+6=22 points) (Linear Regression using R) In this problem you will be working with the Credit data frame from th
#3. (8+8+6=22 points) (Linear Regression using R) In this problem you will be working with the Credit data frame from the ISLR package (which you should have already downloaded to your computer). Remember, you can always get more information about such a data frame by entering ?Credit. Please take note, for example, that in the spreadsheet, the Income variable is written in thousands of dollars. (a) Using the programs introduced in class, create a linear regression model, call it LM1, to predict the variable “Rating” using the single variable “Balance”. Plot the line along with the original data points and find the training error (measured as the square root of the mean squared error). (b) Using the programs introduced in class, create a linear regression model, call it LM2, to predict the variable “Rating” using the three variables “Balance”, “Income” and “Gender". Find the training error (measured as the square root of the mean squared error). (c) What would the LM2 model predict for the rating of a Female with an income of $73,000 and a Balance of $750?
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!