University of Maryland Global Campus Auditing Theory Project

1. Create an R script (*.R) file to build a simple linear regression model using the
Cars93 data set of the MASS R package according to the steps given below. Give
the script file a name that includes your first name and last name like this
Solution-W1-FirstName-LastName.R.
Complete these steps:
Step 1
Include these 3 lines of comments at the beginning of your R (*.R) script file to document
the script:
# Name: Elizabeth Abrams
# Course: MIS446
# Module: 7
Step 2
Load the R package MASS, and its Cars93 data set, using the R command:
library(MASS)
1.
I.
II.
III.
IV.
Subset the Cars93 data set into a smaller data set that excludes vehicles
with EngineSize less than the median of EngineSize and excludes all
variables except the EngineSize and MPG.city variables.
Build a simple linear regression model using MPG.city as the dependent
variable and the EngineSize as the independent variable.
Write down the linear regression equation as an R comment.
Calculate the 95% and the 99% confidence interval estimates of the
regression coefficient of the independent variable EngineSize.
Your R code should be well commented and well organized to explain what the code
does.
Step 3
Enter this Sys.time() R function to print the current date and time and this
Sys.getenv(“username”) R function to print your username as shown here:
Step 4
I.
II.
Display a residual plot of your simple regression model.
Use the regression equation to find the predicted values of MPG.city for the
following values of EngineSize (liters of displacement): 3.00, 3.50, 4.00, 4.50, and
5.00.
Your R code should be well commented and well organized to explain what the code
does.
Step 5
Enter this Sys.time() R function to print current date and time and this
Sys.getenv(“username”) R function to print your username as shown here:
2. Save and execute your *.R script file and display the results of its execution in the
RStudio console and/or the Plots tabs.
Take screenshots of your ordered steps to demonstrate successful completion of your
work. The screenshot should show the R commands you applied and the results you
obtained. Do not capture trial and error results. Only your final results should be
captured. Your screenshot(s) should look something like this:
Summarize your work on this assignment as follows:
o
o
o
Explain how you completed this work and how you resolved the issues
you faced, if any. Explanation of your work should be relevant and
detailed.
Interpret the results you obtained from your work. Interpretation of
results should be relevant and accurate.
Reflect on your experience with this assignment and the lessons you
learned. Reflection on experience should be relevant and personalized.
Submission Template – Assignment
Student Identifying Information
Name:
Course:
Module:
Date:
Embed Here Your R (*.R) Script File or Submit it Separately:
Insert Here APA-Titled and Ordered Screenshots of Steps:
Add Here APA-Styled Explanation of Your Work (200 words):
Add Here APA-Styled Interpretation of Your Results (200 word):
Add Here APA-Styled Reflection on Your Experience (200 words):

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper
Still stressed from student homework?
Get quality assistance from academic writers!

Order your essay today and save 25% with the discount code LAVENDER