Our Services

Get 15% Discount on your First Order

[rank_math_breadcrumb]

R language

Please read the instructions and questions carefully in ” Assignment_2_2024.pdf” file and use “Auto.csv” to finish the assignment. You should submit both 1) an R code ; 2) A PDF report with answers through the link “Submit Assignment 2 Here”.

Guidelines: ➢ Use R and R Studio for this assignment (do not use Excel or any other software) ➢ Submit both R code and PDF Report on findings ➢ Work is to be done individually for this assignment Simple Linear Regression This exercise involves the Auto Data set studied in the lab, which can be found in the file Auto.csv. Make sure that the missing values have been removed from the data. 1) Use read.csv () to load the Auto.csv. Use na.omit() to remove the rows containing missing observations. Use the lm () function to perform a simple linear regression with mpg as the dependent variable and weight as the predictor. Use the summary () function to print the regression results. Take a screenshot of your output. 2) From the regression results, please answer the following questions: a. Is there a relationship between the predictor (weight) and the dependent variable (DV) (mpg)? b. How significant is the relationship between the predictor (weight) and the DV (mpg)? c. Is the relationship between the predictor and the DV positive or negative? d. What is the predicted mpg associated with a weight of 2000? What are the associated 95% confidence and prediction intervals? 3) Please make a scatter plot between the dependent variable (mpg) and the predictor (weight). Please display the least squares regression line in red color. Take a screenshot of your output. 4) Please produce four diagnostic plots of the least squares regression fit. Comment on each plot and conclude whether each plot indicates/shows some problems. Multiple Linear Regression This exercise relates to the College data set, which can be found in the file College.csv. It contains a number of variables for 777 different universities and colleges in the US. The variables are: • Private : Public/private indicator • Apps : Number of applications received 2 • Accept : Number of applicants accepted • Enroll : Number of new students enrolled • Top10perc : New students from top 10% of high school class • Top25perc : New students from top 25% of high school class • F.Undergrad : Number of full-time undergraduates • P.Undergrad : Number of part-time undergraduates • Outstate : Out-of-state tuition • Room.Board : Room and board costs • Books : Estimated book costs • Personal : Estimated personal spending • PhD : Percent of faculty with Ph.D.’s • Terminal : Percent of faculty with terminal degree • S.F.Ratio : Student/faculty ratio • perc.alumni : Percent of alumni who donate • Expend : Instructional expenditure per student • Grad.Rate : Graduation rate 5) First load the data. Use the lm () function to perform a multiple linear regression with Grad.Rate as the dependent variable and other 10 variables including Private, Apps, Accept, Enroll, Top10perc, Top 25perc, PhD, Terminal, S.F.Ratio, Expend as the predictors (independent variables). Use the summary( ) function to print the results. Take a screenshot of your output. 6) From the result, which predictors appear to have statistically significant effects on the dependent variable? 7) What do the results imply? For example, for the positive coefficient of Top10perc, we can interpret that the number of new students from top 10 % of high school class will have a positive and significant influence on the graduation rate. How to interpret the coefficients for all the other significant variables? 8) First use the * symbol to fit the linear regression model with interaction effects (suppose the dependent variable is Grad.Rate; the two independent variables are Private and Top10perc; the interaction term is the product of Private and Top10perc). Then, use : symbol to fit the same linear regression model with interaction effects (the dependent variable is Grad.Rate; the two independent variables are Private and Top10perc; the interaction term is the product of Private and Top10perc). Take a screenshot of your output and then answer the question. Is the interaction term significant? 3 9) Use the lm () function to perform a multiple linear regression with Grad.Rate as the dependent variable and other variables such as Private, Apps, Accept, Enroll, Top10perc, Top 25perc, PhD, Terminal, S.F.Ratio, Expend as the predictors (independent variables) as we did in Question (5). And then test VIF (refer page 101-102 from the textbook for understanding this concept). Do VIF values for some variables indicate a problematic amount of collinearity? Take a screenshot of your output and then answer the question. 10) Use the lm () function to perform a multiple linear regression with Grad.Rate as the dependent variable and other variables such as Private, Apps, Accept, Enroll, Top10perc, Top 25perc, PhD, Terminal, S.F.Ratio, Expend as the predictors (independent variables) as we did in Question (5). And then use Backward Selection Method (refer textbook p.79) to decide the optimal model with all the remaining variables having p-values below 0.05. Take a screenshot of the regression results for the final optimal model (i.e. all the remaining variables have p values below 0.05). What to submit: 1. R code. a. Should include all the code to accomplish the tasks. b. Clear and concise comments to indicate what part of the assignment each code chunk pertains to. c. Code should be easily readable. d. Filename should be in the format of: LastnameFirstname_A2.R 2. Report. a. Take screenshots of your outputs in R Studio and answer all the questions. b. Submit in PDF format. c. Answers questions clearly and concisely. d. Includes appropriate plots. Make sure the plots are properly labeled. e. The assignment will be graded on the correctness of the answers, comprehensiveness of the analysis, clarity of results’ presentation and neatness of the report.

Share This Post

Email
WhatsApp
Facebook
Twitter
LinkedIn
Pinterest
Reddit

Order a Similar Paper and get 15% Discount on your First Order

Related Questions

Computer Science 2 Assignments

Operational Excellence Week 2 Assignment Information Systems for Business and Beyond Questions: · Chapter 3 – study questions 1-8, Exercise 2, 4 & 5 Information Technology and Organizational Learning Assignment: Chapter 3 – Complete the two essay assignments noted below:  · Review the strategic integration section.  Note what strategic integration is and how

Discussion 3: generative adversarial nets

  Generative adversarial nets are mentioned in 2014 by Ian Goodfellow et al.  Why is generative adversarial network a key turning point in the history of generative modeling? Why is the field of image generation important? 

Week 3 – Linear Regression & Business Decision Making

attached file.  An asset management company must replace the manager of its two signature mutual funds, who is about to retire. Two candidates have been short-listed. The management team is divided and cannot decide which of the two candidates would make the better mutual fund manager. The retiring manager presents

data science

Final Exam Due Saturday 11:59 pm (Week 15) You cannot use any of the datasets in our assignments, class notes, and your own midterm project. If you are using the same one, you will receive 0 for your final project. 1. Question Formulation (5 points): You need to devise a

Letter of Recommendations

Hi  Attached is the sample of Letter of recommendation  Please write about it accordingly  1. Write about author :AUTHOR WILL BE professor David Kimble I will give links about his Biography write accordingly or you can use your own search engines about him to write it. 2 . How the

Letter of Recommendations

Hi  Attached is the sample of Letter of recommendation  Please write about it accordingly  1. Write about author :AUTHOR WILL BE professor David Kimble I will give links about his Biography write accordingly or you can use your own search engines about him to write it. 2 . How the

data science

Final Exam Due Saturday 11:59 pm (Week 15) You cannot use any of the datasets in our assignments, class notes, and your own midterm project. If you are using the same one, you will receive 0 for your final project. 1. Question Formulation (5 points): You need to devise a

IT 202

5/15/24, 10:59 AM Assignment Information 1/3 IT 202 Project One Milestone Guidelines and Rubric Overview For the purposes of this assignment, imagine that you are a systems architect at a medium-sized publishing company with 130 employees. The company primarily publishes books, both in print and online. It also produces other

Assessments

Perimeter defense techniques Evaluate the types of assessments, select one that you might use, and explain why it is important. Of the top eight areas to research when conducting an assessment, select no less than three and explain how one should approach the research and why it should be approached

project ppt presentation

Project 3 – Ensemble Methods and Unsupervised Learning In this project you will explore some techniques in unsupervised learning as well as ensemble methods. It is important to realize that understanding an algorithm or technique requires understanding how it behaves under a variety of circumstances. You will go through the

Week 2 understanding on Python.

PDF for reference purpose other file is requirement Python Installation & Examples Atif Farid Mohammad PhD 1. Open any Browser 2. Go to 3. Click at Download button 4. Go to your Download Folder (In both Windows and Mac) a. In Windows you will have the file: Anaconda3-2022.05-Windows-x86_64.exe b. Double

Computer Science Assignments

Operational Excellence Week 2 Assignment information Systems for Business and Beyond Questions · Chapter 2 – study questions 1-10, Exercise 2      Information Technology and Organizational Learning Questions · Chapter 2 – Note why the IT organizational structure is an important concept to understand.  Also, note the role of

Computer Science IT project assignment

Pg. 01 Project I Project Deadline: Sunday 12/5/2024 @ 23:59 [Total Mark is 14] Introduction to Database IT244 College of Computing and Informatics Project Instructions · You can work on this project as a group (minimum 2 and maximum 3 students). Each group member must submit the project individually with

project ppt presentation

Project 3 – Ensemble Methods and Unsupervised Learning In this project you will explore some techniques in unsupervised learning as well as ensemble methods. It is important to realize that understanding an algorithm or technique requires understanding how it behaves under a variety of circumstances. You will go through the

coding

Assignment 6 Due Saturday 11:59 pm (Week 14) Part 1 (50 points) We will explore the Marvel Network Universe. The dataset which you will find in Blackboard consists of the hero’s networks. For this dataset, you will need to ask yourself 3 questions (i.e which superhero knows more superheroes?) ,

project ppt presentation

Project 3 – Ensemble Methods and Unsupervised Learning In this project you will explore some techniques in unsupervised learning as well as ensemble methods. It is important to realize that understanding an algorithm or technique requires understanding how it behaves under a variety of circumstances. You will go through the

How hackers get info

Identify at least two ways in which hackers gather information about companies. What can companies do to limit this access, specifically to the ways you have identified? Which type of information can be gathered with enumeration? How and why should companies protect themselves against enumeration attempts?