Self Assessment 1
Due Feb 5 at 10:59pm Points 30 Questions 12
Available Jan 24 at 7am - Feb 5 at 10:59pm 13 days Time Limit None
Allowed Attempts Unlimited
Instructions
Self Assessment 1 covers the topics in Weeks 1, 2 and 3 and is worth 1% of your overall grade. You
may work on the homework for as long as you like within the given window. Please note that your
answers will automatically save as you key them and you are allowed multiple attempts. Again, please
note, you should only click "submit" when you are completely finished with the assignment and
ready to submit it for grading.
Also, please remember that you are to complete this assignment on your own. Any help given or
received constitutes cheating. If you have any general questions about the assignment, please post to
the Piazza board. If your question involves specific references to the answer to a question or
questions, please be sure to mark your post as private.
Good luck!
This quiz was locked Feb 5 at 10:59pm.
Attempt History
Attempt Time Score
LATEST Attempt 1 135 minutes 30 out of 30
Correct answers are hidden.
Score for this attempt: 30 out of 30
Submitted Jan 27 at 5:15pm
This attempt took 135 minutes.
Self Assessment 1 (Total 30 points)
For Questions 1-8: Install and load the dataset named Carseats (in
the ISLR package) into R.
, R code:
install.packages(“ISLR”)
library(“ISLR”)
data("Carseats")
For Questions 1-4: Create a linear regression model (using the lm
function) with Sales as the dependent variable and Price as the
independent variable.
For Questions 5-8, create a linear regression model (using the lm
function) with Sales as the dependent variable and Price, Bad_Shelf,
and Good_Shelf as independent variables.
Create two indicator (dummy) variables:
Bad_Shelf = 1 if ShelveLoc = “Bad”, 0 otherwise
Good_Shelf = 1 if ShelveLoc = “Good”, 0 otherwise
For questions 9-12, use the file PriceDemand.csv. Download it from
here:
https://www.dropbox.com/s/62jev2rnapxq6pw/PriceDemand.csv?
dl=0
(https://www.dropbox.com/s/62jev2rnapxq6pw/PriceDemand.csv?dl=0)
Background information: A consumer packaged goods firm is studying the
sales of its flagship brand of laundry detergent, CleanPill. We have
weekly data over a 50-week period on units sold and retail price (in
dollars) in a dataset called PriceDemand.
Code to load the data set: PriceDemand = read.csv("PriceDemand.csv",
header = TRUE)
Fit a linear regression model with Qty as the response variable and Price
as the explanatory variable.
Due Feb 5 at 10:59pm Points 30 Questions 12
Available Jan 24 at 7am - Feb 5 at 10:59pm 13 days Time Limit None
Allowed Attempts Unlimited
Instructions
Self Assessment 1 covers the topics in Weeks 1, 2 and 3 and is worth 1% of your overall grade. You
may work on the homework for as long as you like within the given window. Please note that your
answers will automatically save as you key them and you are allowed multiple attempts. Again, please
note, you should only click "submit" when you are completely finished with the assignment and
ready to submit it for grading.
Also, please remember that you are to complete this assignment on your own. Any help given or
received constitutes cheating. If you have any general questions about the assignment, please post to
the Piazza board. If your question involves specific references to the answer to a question or
questions, please be sure to mark your post as private.
Good luck!
This quiz was locked Feb 5 at 10:59pm.
Attempt History
Attempt Time Score
LATEST Attempt 1 135 minutes 30 out of 30
Correct answers are hidden.
Score for this attempt: 30 out of 30
Submitted Jan 27 at 5:15pm
This attempt took 135 minutes.
Self Assessment 1 (Total 30 points)
For Questions 1-8: Install and load the dataset named Carseats (in
the ISLR package) into R.
, R code:
install.packages(“ISLR”)
library(“ISLR”)
data("Carseats")
For Questions 1-4: Create a linear regression model (using the lm
function) with Sales as the dependent variable and Price as the
independent variable.
For Questions 5-8, create a linear regression model (using the lm
function) with Sales as the dependent variable and Price, Bad_Shelf,
and Good_Shelf as independent variables.
Create two indicator (dummy) variables:
Bad_Shelf = 1 if ShelveLoc = “Bad”, 0 otherwise
Good_Shelf = 1 if ShelveLoc = “Good”, 0 otherwise
For questions 9-12, use the file PriceDemand.csv. Download it from
here:
https://www.dropbox.com/s/62jev2rnapxq6pw/PriceDemand.csv?
dl=0
(https://www.dropbox.com/s/62jev2rnapxq6pw/PriceDemand.csv?dl=0)
Background information: A consumer packaged goods firm is studying the
sales of its flagship brand of laundry detergent, CleanPill. We have
weekly data over a 50-week period on units sold and retail price (in
dollars) in a dataset called PriceDemand.
Code to load the data set: PriceDemand = read.csv("PriceDemand.csv",
header = TRUE)
Fit a linear regression model with Qty as the response variable and Price
as the explanatory variable.