Need help with your Discussion

Get a timely done, PLAGIARISM-FREE paper
from our highly-qualified writers!

glass
pen
clip
papers
heaphones

R Question

R Question

R Question

Description

 

Unformatted Attachment Preview

Homework 4
PSTAT Fall 2022
Due date: November 30th, 2022 at 23:59 PT
±. This question uses the Auto dataset available in the ISLR package. The dataset under the name Auto
is automatically available once the ISLR package is loaded.
library(ISLR)
data(Auto)
The dataset Auto contains the following information for 392 vehicles:
-pg: miles per gallon
#ylinders: number of cylinders (between 4 and 8)
$isplacement: engine displacement (cu.inches)
(orsepower: engine horsepower
7eight: vehicle weight (lbs)
!cceleration: time to accelerate from 0 to 60 mph (seconds)
9ear: model year
/rigin: origin of the vehicle (numerically coded as 1: American, 2: European, 3: Japanese)
.ame: vehicle name
Our goal is to analyze several linear models where mpg is the response variable.
(a) (2 pts) In this data set, which predictors are qualitative, and which predictors are quantitative?
(b) (2 pts) Explore the data and perform a descriptive analysis of each variable, include any plot/statistics
that you find relevant (histograms, boxplots, scatter diagrams, correlation coefficients). Comment on
your findings.
(c) (2 pts) Fit a MLR model to the data, in order to predict mpg using all of the other predictors except
for name. For each predictor in the fitted MLR model, comment on whether you can reject the null
hypothesis that there is no linear association between that predictor and mpg, conditional on the other
predictors in the model.
(d) (2 pts) What mpg do you predict for a Japanese car with three cylinders, displacement 100, horsepower
of 85, weight of 3000, acceleration of 20, built in the year 1980?
(e) (2 pts) On average, holding all other predictor variables fixed, what is the difference between the mpg
of a Japanese car and the mpg of an European car?
(f) (2 pts) Fit a model to predict mpg using origin and horsepower, as well as an interaction between
origin and horsepower. Present the summary output of the fitted model, and write out the fitted linear
model.
(g) (2 pts) Following the previous question: On average, how much does the mpg of a Japanese car change
with a one-unit increase in horsepower?
(h) (2 pts) If we are fitting a polynomial regression with mpg as the response variable and weight as the
predictor, what should be a proper degree of that polynomial?
(i) (4 pts) Perform a backward selection, starting with the full model which includes all predictors (except
for name). What is the best model based on the AIC criterion? What are the predictor variables in
that best model?
1
2. Use the fat data set available from the faraway package. Use the percentage of body fat: siri as the
response, and the other variables, except bronzek and density as potential predictors. Remove every
tenth observation from the data for use as a test sample. Use the remaining data as a training sample,
building the following models:
(a) (5 pts) Linear regression with all the predictors.
(b) (5 pts) Linear regression with variables selected using AIC and BIC. Include comparison plots and
comment on your findings.
(c) (5 pts) Ridge regression.
(d) (5 pts) Use the models you fit to predict the response in the test sample (provide point and interval
estimate). How do the models compare in terms of prediction (refer to both precision and accuracy)?
2

Purchase answer to see full
attachment
Explanation & Answer:

1 Script

User generated content is uploaded by users for the purposes of learning and should be used following our honor code & terms of service.

Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."

Order Solution Now

Our Service Charter


1. Professional & Expert Writers: Eminence Papers only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Eminence Papers are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Eminence Papers are known for the timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Eminence Papers, we have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.

We Can Write It for You! Enjoy 20% OFF on This Order. Use Code SAVE20

Stuck with your Assignment?

Enjoy 20% OFF Today
Use code SAVE20