Question: how do i code this on R studio? Overview The ISLR2 library contains a dataset called Auto. This dataset contains a list of American cars,

how do i code this on R studio?

Overview

The ISLR2 library contains a dataset called Auto. This dataset contains a list of American cars, with

variables for the mpg, horsepower, weight, and acceleration.

If you are unfamiliar with car terminology. MPG is a measure of fuel efficiency (more mpg, more efficient)

and horsepower is a measurement of how much "power" an engine produces (more horsepower, more power).

The car weights are measured in pounds.

The "origin" variable is a categorical variable for where the car was made. 1 Is American, 2 is European, 3

is Japanese.

To complete this lab: create a Word document (or similar document) with results for all questions in the

Lab Steps section.

Include photos of plots.

Set-up

1. Load the Auto dataset

Lab Steps

1. Create a linear model with response = mpg, and explanatory variable horsepower

2. Plot a scatter plot using the residuals and fitted values from your linear model

3. Does the scatter plot provide evidence that a linear regression assumption is violated? Explain.

4. Plot a histogram and QQPlot for the residuals

5. Do you believe the residuals are approximately normally distributed?

6. Create a linear model with response = horsepower, and explanatory variables weight, origin, cylinders

and acceleration

7. Repeat steps 2, 3, 4, 5 for this model

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!