Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1. For this question use the Auto data set from the ISLR package. To access this data set first install the package using install.packages

image text in transcribed

Question 1. For this question use the Auto data set from the ISLR package. To access this data set first install the package using install.packages ("ISLR") (this only needs to be done once). Then load the package into R using the command library (ISLR). You can read about this data set in the help menu by entering the command ?Auto (a) (10 points) Make a scatter plot with mpg on the y-axis, and horsepover on the x-axis. (b) (10 points) Use the 1m() function to estimate a second degree (quadratic) polynomial regression model. That is, fit the m odel Y-Ao +Ax+2x2 + e, where Y-mpg and x = horsepower. Use the summary() function to print the results. (c) (10 points) Use the fitted regression model to make a prediction and 95% prediction interval for the mpg of a vehicle that has horsepower 150. (d) (10 points) Add the fitted second degree polynomial regression curve to the scatter plot of mpg versus horsepower. You may use either the base-R or ggplot2 approach (e) (10 points) Make a plot of the residuals versus fitted values, and a QQ-plot of the standardized residuals. Comment on whether or not there are any violations of the assumptions for regression modeling Question 1. For this question use the Auto data set from the ISLR package. To access this data set first install the package using install.packages ("ISLR") (this only needs to be done once). Then load the package into R using the command library (ISLR). You can read about this data set in the help menu by entering the command ?Auto (a) (10 points) Make a scatter plot with mpg on the y-axis, and horsepover on the x-axis. (b) (10 points) Use the 1m() function to estimate a second degree (quadratic) polynomial regression model. That is, fit the m odel Y-Ao +Ax+2x2 + e, where Y-mpg and x = horsepower. Use the summary() function to print the results. (c) (10 points) Use the fitted regression model to make a prediction and 95% prediction interval for the mpg of a vehicle that has horsepower 150. (d) (10 points) Add the fitted second degree polynomial regression curve to the scatter plot of mpg versus horsepower. You may use either the base-R or ggplot2 approach (e) (10 points) Make a plot of the residuals versus fitted values, and a QQ-plot of the standardized residuals. Comment on whether or not there are any violations of the assumptions for regression modeling

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning Databases With PostgreSQL From Novice To Professional

Authors: Richard Stones, Neil Matthew

2nd Edition

1590594789, 978-1590594780

More Books

Students also viewed these Databases questions

Question

Different formulas for mathematical core areas.

Answered: 1 week ago