Session Ready
Exercise

Predictive performance

You can use your model to make predictions for any chosen price level. Obtaining reasonable predictions is dependent on the correctness of your assumption that volume sales and unit price are linearly related.

You will display the relation between SALES and PRICE in a simple scatterplot by using the function plot(). Just like the lm() function, the plot() function can also operate on the formula argument SALES ~ PRICE, and will create the required graph. Next, you add the model predictions by using the function abline(), which adds a straight line specified in sales intercept/price slope form when applied to the linear.model object.

Instructions
100 XP
  • Display the relation between SALES and PRICE by using the function plot().
  • Again, explain SALES by PRICE and assign the result to an object named linear.model.
  • Add the model predictions by applying the function abline() to the linear.model object.