15.071 | Spring 2017 | Graduate

The Analytics Edge

2.2 The Statistical Sommelier: An Introduction to Linear Regression

2.2 The Statistical Sommelier: An Introduction to Linear Regression

Quick Question

In R, use the dataset wine (CSV) to create a linear regression model to predict Price using HarvestRain and WinterRain as independent variables. Using the summary output of this model, answer the following questions:

What is the “Multiple R-squared” value of your model?

Exercise 1

 Numerical Response 

 

What is the coefficient for HarvestRain?

Exercise 2

 Numerical Response 

 

What is the intercept coefficient?

Exercise 3

 Numerical Response 

 

Explanation

In R, create the model by typing the following line into your R console:

modelQQ4 = lm(Price ~ HarvestRain + WinterRain, data=wine)

Then, look at the output of summary(modelQQ4). The Multiple R-squared is listed at the bottom of the output, and the coefficients can be found in the coefficients table.

CheckShow Answer

Course Info

As Taught In
Spring 2017
Level
Learning Resource Types
Lecture Videos
Lecture Notes
Problem Sets with Solutions