CommencerCommencer gratuitement

Making predictions

To improve pricing decisions, the marketing manager needs to know how many volume sales can be expected under alternative unit prices. In particular, he wants to know the expected volume sales for the unit prices of 1.05 and 0.95?

You can use the coefficients from your previously fitted linear sales response model to make these predictions. The coef() function returns a numeric coefficient vector with two elements: The first element is the sales intercept and the second element is the price slope of the linear.model object. You calculate the expected sales by simply adding the price slope multiplied by 1.05 and 0.95 to the sales intercept.

Cet exercice fait partie du cours

Building Response Models in R

Afficher le cours

Instructions

  • Obtain the estimated coefficients from the linear.model object by using the function coef(). Extract the sales intercept and the price slope coefficients individually by numeric indexing.
  • Calculate the expected volume sales for the unit prices 1.05 and 0.95.

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Obtain the intercept coefficient
coef(linear.model)[___]

# Obtain the slope coefficient
coef(linear.model)[___]

# Calculate the volume sales for the unit price of 1.05 
___(linear.model)[___] + ___ * ___(linear.model)[___]

# Calculate the volume sales for the unit price of 0.95 
___(___)[___] + ___ * ___(___)[___]
Modifier et exécuter le code